A00-212 practice questions, page 7 of 8, with answer review and explanations.
Question 31
The following SAS program is submitted: data temp; set sasuser.history(kep=date); format date qtr if first.date then total=0; total+1; if last.date; run; proc print data=temp; run SASUSER.HISTORY is sorted by the SAS date variable DATE. The following output is required: Date Total - 1 13 3 15 4 25 Which By statement completes the data step and successfully generates the required output?
by groupformat date;
by formateed date;
by notsorted date;
by date qtr
Question 32
Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS data library?
MODIFY and CHANGE statements
RENAME statement only
CHANGE statement only
MODIFY and RENAME statements
Question 33
Given has SAS dataset ONE: The following SAS program is submitted: Proc sql; from one; quit; The following output is desired: Which SQL procedure clause completes the program and generates the desired output?
Select salary, salary*.10 var=BONUS
Select salary, salary*.10 label='BONUS'
Select salary, salary *.10 column='BONUS'
Select salary, salary*.10 name='BONUS'
Question 34
Given the non-indexed SAS data set TEMP: TEMP - X Y - - - P 52 - P 45 - A 13 - A 56 - R 34 - R 12 - R 78 - The following SAS program is submitted: Proc print data=temp; run; Which BY statement completes the program, creates a listing report that is grouped by X and completes without errors?
By X notsorted;
By X grouped;
By Descending X;
By X;
Question 35
Given the data set SASHELP.CLASS SASHELP.CLASS - NAME AGE - Mary 15 - Philip 16 - Robert 12 - Ronald 15 - The following SAS program is submitted %let value = Philip; proc print data =sashelp.class; run; Which WHERE statement successfully completes the program and produces a report?