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?
ENAME POINTS MONTH Wang 3 3 Wang 1 12 Wang 1 8 Gerard 3 3 Amy 2 4 Amy 1 7
ENAME POINTS MONTH Amy 2 4 Amy 1 7 Gerard 3 3 Wang 3 3 Wang 1 8 Wang 1 12
ENAME POINTS MONTH Wang 3 3 Wang 1 8 Wang 1 12 Gerard 3 3 Amy 2 4 Amy 1 7
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?
Obsnewdate mdate ddate 104/15/2005 APR 6
Obs newdate mdate ddate 104/15/2005 4 6
Obs newdate mdate ddate 104/15/2005 APR 7
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?
25.31
$25.31
. (missing numeric value)
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?
a list of variable names
the total number of variables
a list of the variables in alphabetic order
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?