A00-211

A00-211 practice questions, page 6 of 11, with answer review and explanations.

Question 26

Given the SAS data set WORKAWARDS: WORK.AWARDS - FNAME POINTS MONTH - ----------- ------------ ----------- Amy 2 4 - Amy 1 7 - Gerard 3 3 - Wang 3 3 - Wang 1 12 - Wang 1 8 - The following SAS program is submitted: proc sort data = work.awards; by descending fname points; run; How are the observations sorted?

  1. ENAME POINTS MONTH Wang 3 3 Wang 1 12 Wang 1 8 Gerard 3 3 Amy 2 4 Amy 1 7
  2. ENAME POINTS MONTH Amy 2 4 Amy 1 7 Gerard 3 3 Wang 3 3 Wang 1 8 Wang 1 12
  3. ENAME POINTS MONTH Wang 3 3 Wang 1 8 Wang 1 12 Gerard 3 3 Amy 2 4 Amy 1 7
  4. ENAME POINTS MONTH Wang 1 12 Wang 1 8 Wang 3 3 Gerard 3 3 Amy 1 7

Question 27

The following SAS program is submitted: libname temp SAS data library; data work.new; set temp.jobs; format newdate mmddw10.; mdate = month(newdate); ddate = weekday(newdate); run; proc print data = work.new; run; The variable NEWDATE contains the SAS date value for April 15. 2005. What output is produced if April 15, 2005 falls on a Friday?

  1. Obsnewdate mdate ddate 104/15/2005 APR 6
  2. Obs newdate mdate ddate 104/15/2005 4 6
  3. Obs newdate mdate ddate 104/15/2005 APR 7
  4. Obs newdate mdate ddate

Question 28

The contents of the raw data file PRODUCT are listed below: --------10-------20-------30 24613 $25.31 The following SAS program is submitted: data inventory; infile 'product'; input idnum 5. @10 price; run; Which one of the following is the value of the PRICE variable?

  1. 25.31
  2. $25.31
  3. . (missing numeric value)
  4. No value is stored as the program fails to execute due to errors.

Question 29

The following SAS program is submitted: proc contents data = sashelp.class varnum; quit; What does the VARNUM option print?

  1. a list of variable names
  2. the total number of variables
  3. a list of the variables in alphabetic order
  4. a list of the variables in the order they were created

Question 30

The following SAS program is submitted: data test; set chemists; jobcode = Chem2 then description = Senior Chemist; else description = Unknown; run; The value for the variable JOBCODE is: JOBCODE - ------------- chem2 What is the value of the variable DESCRIPTION?

  1. chem2
  2. Unknown
  3. Senior Chemist
  4. ‘ ‘ (missing character value)