Exam : A00-201
Title : SAS Base Programming
Ver : 11.30.06
A00-201
QUESTION 1
In the following SAS program, the input data files are sorted by the NAMES variable:
libnametemp '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.
Answer: B
QUESTION 2
When the following SAS program is submitted, the data set SASDATA.PRDSALES contains 5000 observations:
libnamesastemp 'SAS-data-library'; options obs = 500;
proc print data = sasdata.prdsales (firsttobs = 100); run;
options obs = max;
proc means data = sasdata.prdsales (firsttobs = 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: B
QUESTION 3
The following SAS program is submitted:
Actualtests.com - The Power of Knowing
A00-201
data work.new; length word $7; amount = 7;
if amount = 5 then word = 'CAT'; else if amount = 7 then word = 'DOG'; else work = '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: A
QUESTION 4
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.
C. It adds the value of an expression to an accumulator variable and ignores missing values.
D. It does not retain the accumulator variable value from one iteration of the SAS DATA step to the next.
Answer: C
QUESTION 5
The following SAS program is submitted: data work.sets; do until (prod gt 6); prod + 1; end; run;
Which one of the following is the value of the variable PROD in the output data set? A. 5 B. 6
Actualtests.com - The Power of Knowing
A00-201
C. 7 D. 8
Answer: C
QUESTION 6
The following SAS program is submitted: proc print data = sasuser.houses; run;
Which one of the following OPTIONS statements resets the page number to 1 for the second report?
A. option pageno = 1; B. option pagenum = 1; C. options reset pageno = 1; D. options reset pagenum = 1;
Answer: A
QUESTION 7
The contents of the raw data file PRODUCT are listed below: ----|----10---|----20---|----30 24613 $25.31
The following SAS program is submitted: data inventory; infile 'product';
input idnum 5. @10 price; run;
Which one of the following is the value of the PRICE variable?
A. 25.31 B. $25.31
C. . (missing numeric value)
D. No value is stored as the program fails to execute due to errors.
Answer: C
QUESTION 8
The contents of the raw data file TYPECOLOR are listed below: ----|----10---|----20---|----30 daisyyellow
The following SAS program is submitted: data flowers;
Actualtests.com - The Power of Knowing
A00-201
infile'typecolor';
input type $ 1-5 +1 color $; run;
Which one of the following represents the values of the variables TYPE and COLOR?
A. type color daisy yellow B. type color daisy ellow C. type color
daisyyellow (missing character value)
D. No values are stored as the program fails to execute due to syntax errors.
Answer: B
QUESTION 9
A raw data record is listed below: ----|----10---|----20---|----30 son,Travis,
The following output is desired: relation firstname son Travis
Which one of the following SAS programs reads the data correctly?
A. data family / dlm = ','; infile 'file-specification'; input relation $ firstname $; run;
B. option dlm = ','; data family;
infile 'file-specification'; input relation $ firstname $; run;
C. data family;
infile 'file-specification' option dlm = ','; input relation $ firstname $; run;
D. data family;
infile 'file-specification';
input relation $ firstname $ / dlm = ','; run;
Answer: C
Actualtests.com - The Power of Knowing