SASInstitute SAS 9.4 Base Programming - Performance-based - A00-231 Exam Practice Test

Given the following SAS log entry:

What caused the error?
Correct Answer: D
The following SAS program is submitted:
Data_null_;
set old;
put sales 1 sales2;
run;
Where is the output written?
Correct Answer: D
Given the SAS data set EMPLOYEES:
EMPLOYEES
NAME SALARY
-------- ------------
Innis60000
Jolli50000
Ellis55000
Liu45000
The following SAS program is submitted:
proc print data = employees; where name like '_i%';
run;
What is contained in the output?
Correct Answer: A
What is the purpose or the MISSOVER option on the INFILE statement?
Correct Answer: A
Given the SAS data set WORK.ONE:

And the SAS data set WORK.TWO:

The following program is submitted:

What is the first observation in the SAS data set WORK.BOTH?
Correct Answer: D
The SAS data set EMPLOYEE_INFO is listed below:
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;
run;
Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within each descending IDNUMBER value?
Correct Answer: B
The following SAS program is submitted:
data allobs;
set sasdata.origin (firstobs = 75 obs = 499);
run;
The SAS data set SASDATA.ORIGIN contains 1000 observations.
How many observations does the ALLOBS data set contain?
Correct Answer: A
The following SAS program is submitted:
data one;
addressl = '214 London Way';
run;
data one;
set one;
address = tranwrd(address1, 'Way', 'Drive'); run;
What are the length and value of the variable ADDRESS?
Correct Answer: A
Scenario:
This project will use data set cert.input08a and cert.input08b. At any time, you may save your program as program08 in cert\programs.
Both data sets contain a common numeric variable named ID.
Write a program that will use a SAS DATA Step to:
* Combine data sets cert.input08a and cert.input08b by matching values of the ID variable.
* Write only observations that are in both data sets to a new data set named results.match08.
* Write all other non-matching observations from either data set to a new data set named results.nomatch08.
* Exclude all variables that begin with "ex" from results.nomatch08.
How many variables (columns) are in _______________ results.nomatch08
Enter your numeric answer in the space below:
Save your program as ______________ program08.sas in folder cert programs before continuing with the next project.
Correct Answer:
5
Explanation:
SAS code that could be used to solve this project:
Proc
sort data=cert.input08a out=work.input08a;
by ID;
run;
proc sort data=cert.input08b out=work.input08b;
by ID;
run;
data results.match08 results.nomatch08 (drop=ex: );
merge work.input08a (in=a) work.input08b (in=b);
by ID;
if a and b then output results.match08;
else output results.nomatch08;
run;
proc contents data=results.match08;
run;
proc contents data=results.nomatch08;
run;
The correct answer is: 5
The following SAS program is submitted:
data work.retail;
cost = '20000';
total= .10* cost
run;
What is the result?
Correct Answer: C
The following SAS program is submitted:
<insert ODS statement here>
proc means data = sasuser.shoes;
where product in ('Sandal' , 'Slipper' , 'Boot');
run;
<insert ODS statement here>
Which ODS statements complete the program and send the report to an HTML file?
Correct Answer: C
0
0
0
0