SASInstitute SAS 9.4 Base Programming - Performance-based (A00-231) Free Practice Test
Question 1
The following SAS DATA step is submitted:
data sasdata.atlanta
sasdata.boston
work.portland
work.phoenix;
set company.prdsales;
if region = 'NE' then output boston;
if region = 'SE' then output atlanta;
if region = 'SW' then output phoenix;
if region = 'NW' then output portland;
run;
Which one of the following is true regarding the output data sets?
data sasdata.atlanta
sasdata.boston
work.portland
work.phoenix;
set company.prdsales;
if region = 'NE' then output boston;
if region = 'SE' then output atlanta;
if region = 'SW' then output phoenix;
if region = 'NW' then output portland;
run;
Which one of the following is true regarding the output data sets?
Correct Answer: D
Question 2
Which statement about SAS libraries is true? Select one:
Correct Answer: C
Question 3
The following SAS program is submitted:
data WORK.DATE_INFO;
Day="01" ;
Yr=1960 ;
X=mdy(Day,01,Yr) ;
run;
What is the value of the variable X?
data WORK.DATE_INFO;
Day="01" ;
Yr=1960 ;
X=mdy(Day,01,Yr) ;
run;
What is the value of the variable X?
Correct Answer: B
Question 4
Given the SAS data set QTR 1_REVENUE:
destination revenue
YYZ53634
FRA62129
FRA75962
RDU76254
YYZ82174
The following SAS program is submitted:
proc sort data = qtr1_revenue;
by destination descending revenue; run;
What is the first observation in the output data set?
destination revenue
YYZ53634
FRA62129
FRA75962
RDU76254
YYZ82174
The following SAS program is submitted:
proc sort data = qtr1_revenue;
by destination descending revenue; run;
What is the first observation in the output data set?
Correct Answer: A
Question 5
Given the following raw data records:

The following output data set is desired:

Which SAS program correctly reads in the raw data?

The following output data set is desired:

Which SAS program correctly reads in the raw data?
Correct Answer: D
Question 6
The following program is submitted:
proc sort data=SASUSER.PROJECTS out=PSORT;
by Code descending Date Cost;
run;
Which of the following is true concerning the submitted program?
proc sort data=SASUSER.PROJECTS out=PSORT;
by Code descending Date Cost;
run;
Which of the following is true concerning the submitted program?
Correct Answer: A
Question 7
Scenario:
This project will use data set cert.input12. At any time, you may
save your program as program12 in cert\programs.
cert.input12 contains a single observation with two variables:
* salary
* year
Write a SAS program that will:
* Create an output data set results.output12.
* Read cert.input12 as input.
* Increase the salary variable by 5.65% annually until it is
greater than $500,000.
* Increment the year variable by 1 with each annual
increase.
* Create an output data set results.output12 that has one
observation for each value of year. Each observation
should have a year and salary variable.
What is the value of year when the above salary occurs? Enter your numeric answer in the space below.
This project will use data set cert.input12. At any time, you may
save your program as program12 in cert\programs.
cert.input12 contains a single observation with two variables:
* salary
* year
Write a SAS program that will:
* Create an output data set results.output12.
* Read cert.input12 as input.
* Increase the salary variable by 5.65% annually until it is
greater than $500,000.
* Increment the year variable by 1 with each annual
increase.
* Create an output data set results.output12 that has one
observation for each value of year. Each observation
should have a year and salary variable.
What is the value of year when the above salary occurs? Enter your numeric answer in the space below.
Correct Answer:
2027
Explanation:
data results.output12;
set cert.input12;
do until (salary gt 500000);
salary=salary*1.0565;
year+1;
output;
end;
run;
proc print data=results.output 12;
run;
Explanation:
data results.output12;
set cert.input12;
do until (salary gt 500000);
salary=salary*1.0565;
year+1;
output;
end;
run;
proc print data=results.output 12;
run;
Question 8
The following SAS program is submitted:

The program fails execution due to syntax errors.
What is the cause of the syntax error?

The program fails execution due to syntax errors.
What is the cause of the syntax error?
Correct Answer: A
Question 9
The following SAS program is submitted:
data work.flights;
destination = 'cph';
select(destination);
when('LHR') city = 'London';
when('CPH') city = 'Copenhagen';
otherwise city = 'Other';
end;
run;
What is the value of the CITY variable?
data work.flights;
destination = 'cph';
select(destination);
when('LHR') city = 'London';
when('CPH') city = 'Copenhagen';
otherwise city = 'Other';
end;
run;
What is the value of the CITY variable?
Correct Answer: C
Question 10
Given the raw data record in the file phone.txt:

Which SAS statement completes the program and results in a value of "James Stevens" for the variableFullName?

Which SAS statement completes the program and results in a value of "James Stevens" for the variableFullName?
Correct Answer: C
Question 11
Given the SAS data set WORK.ONE:

What value will SAS assign to Total?

What value will SAS assign to Total?
Correct Answer: C