A00-211 practice questions, page 10 of 11, with answer review and explanations.
Question 46
Given the contents of the raw data file TYPECOLOR: ----I----10---I----20---I----30 Daisyyellow - The following SAS program is submitted: data flowers; infile typecolor; input type$ 1-5+1 color$; run; What are the values of the variables TYPE and COLOR?
type color daisygreen
type color daisy ellow
type color daisyyellow" "(missing character value)
No values are stored for the TYPE and COLOR variables.
Question 47
A user-defined format has been created using the FORMAT procedure. Where is it stored?
in a SAS catalog
in an external binary file
in a SAS dataset in the WORK library
in a SAS dataset in a permanent SAS data library
Question 48
The following SAS program is submitted: data work.flights; destination = cph; select(destination); when(LHR) city = London; when(CPH) city = Copenhagen; otherwise city = Other; end; run; What is the value of the CITY variable?
Other
Copenh
Copenhagen
‘‘(missing character value)
Question 49
The following SAS program is submitted: data work.new; length word $7; amount = 4; it amount = 4 then word = FOUR; else if amount = 7 then word = SEVEN; else word = NONE!!!; amount = 7; run; What are the values of the AMOUNT and WORD variables in SAS dataset work.new?
amount word 4 FOUR
amount word 4 NONE!!!
amount word 7 FOUR
amount word
Question 50
The following SAS program is submitted, creating the SAS data set ONE: data one; infile file specification; input num chars$; run; ONE - NUM CHAR - ------- --------- 1 23 3 23 1 77 The following SAS program is submitted: proc print data = one; where char = 23; run; What is output?