A00-211 practice questions, page 4 of 11, with answer review and explanations.
Question 16
The following SAS program is submitted: data work.accounting; set work.department; length jobcode $ 12; jobcode=FAl; run; The WORK.DEPARTMENT data set contains a character variable named JOBCODE with a length of 5. What is the result?
The length of the variable JOBCODE is 3.
The length of the variable JOBCODE is 5.
The length of the variable JOSBODE is 12.
The program fails to execute due to errors.
Question 17
Which ODS statement option terminates output being written to an HTML rile?
END
QUIT
STOP
CLOSE
Question 18
The SAS data set PETS is sorted by the variables TYPE and BREED. The following SAS program is submitted: proc print data = pets; var type breed; sum number; run; What is the result?
The SUM statement produces only a grand total of NUMBER.
The SUM statement produces only subtotals of NUMBER for each value of TYPE.
The SUM statement produces both a grand total of NUMBER and subtotals of NUMBER for each value of TYPE.
Nothing is produced by the SUM statement; the program fails to execute.
Question 19
The following SAS program is submitted: data work.passengers; if OrigPassengers = . then' OrigPassengers = 100; TransPassengers = 100; OrigPassengers = .; TotalPassengers = sum (OrigPassengers, TransPassengers) +0; run; What is the value of the TOTALPASSENGERS variable in the output data set?
0
100
200
(missing numeric value)
Question 20
Given the SAS data set PRICES: Prodid price producttype sales returns K125 5.10 NETWORK 15 2 B132S 2.34 HARDWARE 300 10 R18KY2 1.29 SOFTWARE 25 5 3KL8BY 6.37 HARDWARE 125 15 DY65DW 5.60 HARDWARE 45 5 DGTY23 4.55 HARDWARE 67 2 The following SAS program is submitted: data hware inter cheap; set prices(keep = productype price); if producttype = HARDWARE then output hware; else if producttype = NETWORK then output inter; if price le 5.00; run; if producttype = HARDWARE then output hware; else if producttype = NETWORK then output inter; if price le 5.00; run; How many observations does the HWARE data set contain?