Welcome to TestSimulate

Pass Your Next Certification Exam Fast!

Everything you need to prepare, learn & pass your certification exam easily.

365 days free updates. First attempt guaranteed success.

SASInstitute SAS Advanced Programming Exam for SAS 9 (A00-212) Free Practice Test

Question 1
Given the SAS data set SAUSER.HIGWAY:
SASUSER.HIGHWAY

The following SAS program is submitted:
% macro highway;
proc sql nonprint;
% let numgrp=6;
select distinct status into:group1-:group&numgrp from sasuser.highway;
quit;
% do i=1 %to &numgrp;
proc print data =sasuser.highway;
where status ="&&group&I";
run;
% end;
% mend;
% highway
How many reports are produced?

Correct Answer: D
Question 2
Which one of the following is an advantage of creating and using a SAS DATA step view?

Correct Answer: A
Question 3
Which one of the following SAS integrity constraint types ensures that a specific set or range of values are the only
values in a variable?

Correct Answer: C
Question 4
Given the following SAS data set ONE:
ONE
JOB LEVEL SALARY
ACC 2 300
SEC 1 100
SEC 2 200
MGR 3 700
ACC 1 .
ACC 3 .
MGR 2 400
The following SAS data set TWO is created:
TWO
JOB LEVEL BONUS
ACC 2 30
MGR 3 70
MGR 2 40
Which one of the following SAS programs creates data set TWO?

Correct Answer: B
Question 5
The following SAS program is submitted:
proc contents data = testdata.one;
run;
Which one of the following SQL statements produces similar information about the column attributes as the above
CONTENTS procedure?

Correct Answer: B
Question 6
Given the following SAS data sets ONE and TWO:
ONE TWO
NUM CHAR1 NUM CHAR2
1 A 2 X
2 B 3 Y
4 D 5 V
The following SAS program is submitted creating the output table THREE:
data three;
set one two;
run;
THREE
NUM CHAR1 CHAR2
1 A
2 B
4 D
2 X
3 Y
5 V
Which one of the following SQL programs creates an equivalent SAS data set THREE?

Correct Answer: D
Question 7
Given the following SAS data set ONE:
ONE
REP AREA COST
SMITH NORTH 100
SMITH SOUTH 200
JONES EAST 100
SMITH NORTH 300
JONES WEST 100
JONES NORTH 200
JONES NORTH 400
SMITH NORTH 400
JONES WEST 100
JONES WEST 300
The following SAS program is submitted:
proc sql;
select rep, area, count(*) as TOTAL
from one
group by rep, area;
quit;
Which one of the following reports is generated?

Correct Answer: A,D
Question 8
Given the SAS data sets:

The following SAS DATA step is submitted:

What data values are stored in data set WORK.COMBINE?

Correct Answer: C
Question 9
Which one of the following options controls the pagesize of a SAS data set?

Correct Answer: D
Question 10
The following SAS program is submitted:
proc datasets lib = testdata;
modify one;
label num = 'Number';
format num 4.;
quit;
Which one of the following SQL programs produces the same results as the above DATASETS procedure?

Correct Answer: A
Question 11
Which MACRO option is responsible for this partial SAS log?

Correct Answer: C
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 12
The variable attributes of SAS data sets ONE and TWO are shown below:
ONE TWO
# Variable Type Len Pos # Variable Type Len Pos
2 sales Num 8 8 2 budget Num 8 8
1 year Num 8 0 3 sales Char 8 16
1 year Num 8 0
Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets are sorted by the
variable YEAR.
The following SAS program is submitted:
data three;
merge one two;
by year;
run;
Which one of the following is the result of the program execution?

Correct Answer: C
Question 13
The following SAS program is submitted:
% micro cols1;
name age;
% mend;
% macro cols2;
height weight
% mend
proc print data=sashelp.class;
<insert VAR statement here>
Run
Which VAR statement successfully completes the program and produces a report?

Correct Answer: C
Question 14
The following SAS program is submitted:
% let lib=%upcase(sauser); proc sql;
select nvar form dictionary.tables where libname='&lib"; quit;
Several SAS data sets exist in the SAUSER library.
What is generated as output?

Correct Answer: A