A00-212 practice questions, page 4 of 8, with answer review and explanations.
Question 16
The following SAS program is submitted: %let first=yourname; %let last=first; %put &&&last; What is written to the SAS Log?
First
Yourname
&&First
&yourname
Question 17
The following SAS program is submitted: %let a=cat; %macro animal(a=frog); %let a=bird; %mend; %animal(a=pig) %put a is &a; What is written to the SAS log?
a is pig
a set cat
a is frog
a is bird
Question 18
Which SQL procedure program deletes rows from the data set CLASS?
proc sql; Select * from class Where age<(select stop_age from threshold); Quit;
proc sql; Modify table class Delete where age<(select stop_age from threshold); Quit
proc sql; Delete from class Where age<(select stop_age from threshold); Quit;
proc sql; Alter from class Delete where age<(select stop_age from threshold);
Question 19
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?
A report showing the names of the columns in each table in SASUSER
A report showing the number of columns in each table in SASUSER
A report showing the numeric columns in each table in SASUSER
A report showing the number of numeric columns in each table in SASUSER
Question 20
The following SAS program is submitted: %macro loop; data one; %do I=1 %to 3; var&I=&I;% end run; %mend; %loop After this program executes; the following is written to the SAS log: (LOOP): Beginning execution (LOOP): %DO loop beginning; index variable l; start value is 1; stop value is 3; by value is 1 (LOOP): %DO loop index variable l is now 2; loop will iterate again (LOOP): %DO loop index variable l is no 3; loop will iterate again (LOOP): %DO loop index variable l is no 4; loop will iterate again (LOOP): Ending execution Which SAS system option displays the notes in the SAS log?