A00-211

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?

  1. The length of the variable JOBCODE is 3.
  2. The length of the variable JOBCODE is 5.
  3. The length of the variable JOSBODE is 12.
  4. The program fails to execute due to errors.

Question 17

Which ODS statement option terminates output being written to an HTML rile?

  1. END
  2. QUIT
  3. STOP
  4. 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?

  1. The SUM statement produces only a grand total of NUMBER.
  2. The SUM statement produces only subtotals of NUMBER for each value of TYPE.
  3. The SUM statement produces both a grand total of NUMBER and subtotals of NUMBER for each value of TYPE.
  4. 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?

  1. 0
  2. 100
  3. 200
  4. (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?

  1. 0
  2. 2
  3. 3
  4. 4