SASInstitute SAS base programming - A00-201 Exam Practice Test

Question 1
The following SAS program is submitted:
data _null_;
set old;
put sales1 sales2;
run;
Where is the output written?

Correct Answer: D
Question 2
The following SAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORK.PEOPLE has 5 observations, and the data set WORK.MONEY has 7 observations. How many observations will the data set WORK.EMPSALARY contain?

Correct Answer: A
Question 3
The following SAS program is submitted:
data work.passengers;
if OrigPassengers = . then
OrigPassengers = 100;
TransPassengers = 100;
OrigPassengers = .;
NonPaying = 10;
TotalPassengers = sum (OrigPassengers, TransPassengers);
run;
Which one of the following is the value of the TOTALPASSENGERS variable in the output data set?

Correct Answer: B
Question 4
The following SAS program is submitted:
proc print data = sasuser.houses;
run;
< insert OPTIONS statement here>
proc means data = sasuser.shoes;
run;
Which one of the following OPTIONS statements resets the page number to 1 for the second report?

Correct Answer: D
Question 5
The SAS data set named WORK.TEST is listed below:

Which one of the following SAS programs created this data set?

Correct Answer: C
Question 6
The following SAS program is submitted:
data numrecords;
infile 'file-specification';
input @1 patient $15.
relative $ 16-26 @;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step during execution?

Correct Answer: B
Question 7
Which one of the following is true of the RETAIN statement in a SAS DATA step program?

Correct Answer: C
Question 8
The contents of the raw data file CALENDAR are listed below:
----|----10---|----20---|----30
01012000
The following SAS program is submitted:
data test;
infile 'calendar';
input @1 date mmddyy10.;
if date = '01012000'd then event = 'January 1st';
run;
Which one of the following is the value of the EVENT variable?

Correct Answer: A