QUESTION 112
The contents of the raw data file SIZE are listed below:
----|----10---|----20---|----30
72 95
The following SAS program is submitted:
data test;
in file 'size';
input@ 1 height 2.@ 4 weight 2;
run;
Which one of the following is the value of the variable WEIGHT in the output data set?
A. 2
B. 72
C. 95
D. . (missing numeric value)
Answer: A
--------------------------------------------------------------------------------------------
QUESTION 111
A SAS PRINT procedure output of the WORK.LEVELS data set is listed below:
Obsname level
1 Frank 1
2 Joan 2
3 Sui 2
4 Jose 3
5 Burt 4
6 Kelly .
7 Juan 1
The following SAS program is submitted:
data work . expertise;
set work. levels;
if level = . then
expertise = 'Unknown';
else if level = 1 then
expertise = 'Low';
else if level = 2 or 3 then
expertise =' Medium';
else
expertise = 'High';
run;
Which of the following values does the variable EXPERTISE contain?
A. Low, Medium, and High only
B. Low, Medium, and Unknown only
C. Low, Medium, High, and Unknown only
D. Low, Medium, High, Unknown, and ' ' (missing character value)
Answer: B
这里level=2 or 3和level=2 or level=3有什么区别?
--------------------------------------------------------------------------------------------
QUESTION 24
The following SAS DATA step is submitted:
data sasdata.atlanta
sasdata.boston
work.portland
work.phoenix;
set company.prdsales;
if region = 'NE' then output bostan;
if region = 'SE' then output atlanta;
if region = 'SW' then output phoenix;
if region = 'NW' then output portland;
run;
Which one of the following is true regarding the output data sets?
A. No library references are required.
B. The data sets listed on all the IF statements require a library reference.
C. The data sets listed in the last two IF statements require a library reference.
D. The data sets listed in the first two IF statements require a library reference
Answer: D