Vendor: SAS
Exam Code: A00-212
Exam Name: SAS Advanced Programming for SAS 9
QUESTION 1
The following SAS program is submitted:
data sasuser.history;
set sasuser.history(keep = State x y
rename = (State = St));
total = sum(x, y);
run;
The SAS data set SASUSER.HISTORY has an index on the variable STATE. Which describes the result of submitting the SAS program?
A. The index on STATE is deleted.
B. The index on STATE is updated as an index on ST.
C. The index on STATE is recreated as an index on ST.
D. The index on STATE is deleted and an index on ST is created.
Answer: A
QUESTION 2
The following SAS program is submitted:
%macro one(input);
%two
%mend;
%macro two;
data _null_;
call symputx(‘date’, ’12SEP2008′, ‘G’);
run;
%put the value is &date;
%mend;
%let date = 31DEC2006;
%one(&date)
What is the result when the %PUT statement executes?
A. A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol table.
B. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the ONE macro.
C. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the TWO macro.
D. A macro variable DATE with the value 31DEC2006 is retrieved from the local symbol table for the TWO macro.
Answer: A
QUESTION 3
Which SET statements option names a variable that contains the number of the observation to read during the current iteration of the DATA step?
A. OBS = pointobs
B. KEY = pointobs
C. NOBS = pointobs
D. POINT = pointobs
Answer: D
QUESTION 4
When reading a SAS data file, what does the NOBS=option on the SET statement represent?
A. a variable that represents the current observation number
B. a variable that represents a flag indicating the end of the file
C. a variable that represents the total number of observations in the input data set(s)
D. a variable that represents the total number of observations in the output data set(s)
Answer: C
QUESTION 5
The following SAS program is submitted:
%macro check(num = 4);
%let result = %eval(&num gt 5);
%put result is &result;
%mend;
%check(num = 10)
What is the written to the SAS log?
A. result is
B. result is 10
C. result is 10.5
D. result is 10 + 0.5
Answer: C
QUESTION 6
The following SAS program is submitted:
%macro test(var);
%let jobs = BLACKSMITH WORDSMITH SWORDSMITH;
%let type = %index(&jobs, &var);
%put type = &type;
%mend;
%test(SMITH)
What is the value of the macro variable TYPE when the %PUT statement executes?
A. 0
B. 3
C. 6
D. null
Answer: C
QUESTION 7
The following SAS program is submitted:
%macro check(num = 4);
%let result = %eval(&num gt 5);
%put result is &result;
%mend;
%check(num = 10)
What is written to the SAS log?
A. result is 0
B. result is 1
C. result is 10 gt 5
D. result is true
Answer: B
QUESTION 8
The following SAS program is submitted:
data temp;
length a 1 b 3 x;
infile ‘file reference’;
input a b x;
run;
What is the result?
A. The data set TEMP is created, but variable X is not created.
B. The data set TEMP is created and variable X has a length of 8.
C. The data set TEMP is not created because variable A has an invalid length.
D. The data set TEMP is not created because variables A and B have invalid lengths.
Answer: C
QUESTION 9
Given the SAS data sets ONE and TWO:
ONE TWO
YEAR QTR BUDGET YEAR QTR SALES
——– —— ———— ——- —— ———
2001 3 500 2001 4 300
2001 4 400 2002 1 600
2003 1 350
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:
YEAR QTR BUDGET SALES
——- ——- ——— ————
2001 4 300 500
2001 4 300 400
2002 1 600 350
Which JOIN operator completes the program and generates the desired output?
A. LEFT JOIN
B. RIGHT JOIN
C. FULL JOIN
D. INNER JOIN
Answer: C
QUESTION 10
Given the SAS data set SAUSER.HIGWAY:
SASUSER.HIGHWAY
STEERING SEATBELT SPEED STATUS COUNT
——- ———– ——– ———– ——-
absent No 0-29 serious 31
absent No 0-29 not 1419
absent No 30-49 serious 191
absent no 30-49 not 2004
absent no 50+ serious 216
The following SAS program is submitted:
%macro highway;
proc sql noprint;
%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?
A. 0
B. 2
C. 5
D. 6
Answer: B
QUESTION 11
The following SAS program is submitted:
%let dept = prod;
%let prod = merchandise;
The following message is written to the SAS log:
the value is “merchandise”
Which SAS System option writes this message to the SAS log?
A. %put the value is “&&&dept”;
B. %put the value is “”&&&dept””;
C. %put the value is ‘”‘&&&&dept'”‘;
D. %put the value is %quote(&&&dept);
Answer: A
QUESTION 12
The SAS data set WORK.TEMPDATA contains the variables FMTNAME, START and LABEL and it consists of 10 observations.
The following SAS program is submitted:
Proc format cntlin=wor.tempdata;
Run;
What is the result of submitting the FORMAT procedure step?
A. No formats are created in this step.
B. All formats created will be stored in the WORK.TEMPDATA SAS data set.
C. It uses the WORK.TEMPDATA SAS data set as input to create the format.
D. An ERROR message is written to the SAS log because the program is incomplete.
Answer: C
If you want to pass SAS A00-212 successfully, donot missing to read latest lead2pass SAS A00-212 exam questions.
If you can master all lead2pass questions you will able to pass 100% guaranteed.