SASInstitute SAS Advanced Programming Exam for SAS 9 - A00-212 Exam Practice Test
Which one of the following statements is true?
Correct Answer: A
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?
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
Given the following SAS data set ONE:
ONE
LEVEL AGE
1 10
2 20
3 20
2 10
1 10
2 30
3 10
2 20
3 30
1 10
The following SAS program is submitted:
proc sql;
select level, max(age) as MAX
from one
group by level
having max(age) > (select avg(age) from one);
quit;
Which one of the following reports is generated?
ONE
LEVEL AGE
1 10
2 20
3 20
2 10
1 10
2 30
3 10
2 20
3 30
1 10
The following SAS program is submitted:
proc sql;
select level, max(age) as MAX
from one
group by level
having max(age) > (select avg(age) from one);
quit;
Which one of the following reports is generated?
Correct Answer: A
The following SAS program is submitted:
% macro check(num=4);
% let result=%eval(&nm gt 5);
% put result is &result;
% mend;
% check (num=10)
What is written to the SAS log?
% macro check(num=4);
% let result=%eval(&nm gt 5);
% put result is &result;
% mend;
% check (num=10)
What is written to the SAS log?
Correct Answer: B
Given the SAS data sets ONE and TWO:

The following SAS program is submitted:
Proc sql;
Select two.*,budget from one <insert JOIN operator here> two on one.year=two.year,
Quit;
The following output is desired:

Which JOIN operator completes the program and generates the desired output?

The following SAS program is submitted:
Proc sql;
Select two.*,budget from one <insert JOIN operator here> two on one.year=two.year,
Quit;
The following output is desired:

Which JOIN operator completes the program and generates the desired output?
Correct Answer: B
The following SAS program is submitted:
data temp;
array points{3,2}_temporary_ (10,20,30,40,50,60);
score = points{2,1}
run;
Which one of the following is the value of the variable SCORE in the data set TEMP?
data temp;
array points{3,2}_temporary_ (10,20,30,40,50,60);
score = points{2,1}
run;
Which one of the following is the value of the variable SCORE in the data set TEMP?
Correct Answer: B
The following SAS program is submitted:
data two;
y = '2';
run;
% let x = 10;
% let var = y;
data one;
set two (keep = &var);
z = &var * &x;
run;
Which one of the following is the value of the variable Z when the program finishes execution?
data two;
y = '2';
run;
% let x = 10;
% let var = y;
data one;
set two (keep = &var);
z = &var * &x;
run;
Which one of the following is the value of the variable Z when the program finishes execution?
Correct Answer: D
The following SAS program is submitted:
data new (bufsize = 6144 bufno = 4);
set old;
run;
Which one of the following describes the difference between the usage of BUFSIZE= and BUFNO= options?
data new (bufsize = 6144 bufno = 4);
set old;
run;
Which one of the following describes the difference between the usage of BUFSIZE= and BUFNO= options?
Correct Answer: C
The following SAS program is submitted:
data temp;
array points{2,3} (10,15,20,25,30,35);
run;
What impact does the ARRAY statement have in the Program Data Vector(PDV)?
data temp;
array points{2,3} (10,15,20,25,30,35);
run;
What impact does the ARRAY statement have in the Program Data Vector(PDV)?
Correct Answer: A
Which one of the following options is available for SAS macro debugging?
Correct Answer: C
Which one of the following SAS programs displays the descriptor portion of each data set stored in the SASUSER
library?
library?
Correct Answer: B