EZ Study

Actuarial Biology Chemistry Economics Calculators Confucius Engineer
Physics
C.S.

SAS Programing Certification Exam
Practice Questions & Answer set-50

### Practice Question 238

Which one of the following is true of the SUM statement in a SAS DATA step program?
A. It is only valid in conjunction with a SUM function.
B. It is not valid with the SET, MERGE and UPDATE statements.
Click to Get Those Highly Recommended SAS Programmers' Books
C. It adds value of an expression to an accumulator variable, ignores missing values.
D. It does not retain the accumulator variable value from one iteration of the SAS DATA step to the next.

Answer is C.

### Practice Question 239

The following SAS program is submitted:
data work.new;
length word \$7;
amount = 7;
if amount = 5 then word = 'CAT';
else if amount = 7 then word = 'DOG';
else word = 'NONE!!!';
amount = 5;
run;
Which one of the following represents the values of the AMOUNT and WORD variables?
A. amount word
5 DOG
B. amount word
5 CAT
C. amount word
7 DOG
D. amount word
7 ' ' (missing character value)

Answer is A

### Practice Question 240

When the following SAS program is submitted, the data set SASDATA.PRDSALES contains 5000 observations:
libname sasdata 'SAS-data-library';
options obs = 500;
proc print data = sasdata.prdsales (firstobs = 100);

run; options obs = max;
proc means data = sasdata.prdsales (firstobs = 500);
run;
How many observations are processed by each procedure?
A. 400 for PROC PRINT
4500 for PROC MEANS
B. 401 for PROC PRINT
4501 for PROC MEANS
C. 401 for PROC PRINT
4500 for PROC MEANS
D. 500 for PROC PRINT
5000 for PROC MEANS

Answer is B

### Practice Question 241

In the following SAS program, the input data files are sorted by the NAMES variable:
libname temp 'SAS-data-library';
data temp.sales;
merge temp.sales
work.receipt;
by names;
run;

Which one of the following results occurs when this program is submitted?
A. The program executes successfully and a temporary SAS data set is created.
B. The program executes successfully and a permanent SAS data set is created.
C. The program fails execution because the same SAS data set is referenced for both read and write operations.
D. The program fails execution because the SAS data sets on the MERGE statement are in two different libraries.
Click Coment link to see answer.

Answer is B

Related links:

Continue to SAS Practice Exam Question Answer Set-51   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-49   SAS Tutorial   Statistics Tutorial