A00-212

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?

  1. by groupformat date;
  2. by formateed date;
  3. by notsorted date;
  4. 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?

  1. MODIFY and CHANGE statements
  2. RENAME statement only
  3. CHANGE statement only
  4. 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?

  1. Select salary, salary*.10 var=BONUS
  2. Select salary, salary*.10 label='BONUS'
  3. Select salary, salary *.10 column='BONUS'
  4. 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?

  1. By X notsorted;
  2. By X grouped;
  3. By Descending X;
  4. 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?

  1. Where upcase(name)="upcase(&value)";
  2. Where upcase(name)="%upcase(&value)";
  3. Where upcase(name)=upcase(&value);
  4. Where upcase(name)=%upcase(&value);