|
|
楼主

楼主 |
发表于 2007-10-20 08:13:13
|
只看该作者
SAS Base 50题一问,请高手指点!!
11. The SAS data set SASHELP.PRDSALE contains the variables REGION and SALARY with 4
observations per REGION. SASHELP.PRDSALE is sorted primarily by REGION and within REGION
by SALARY in descending order.
The following SAS program is submitted:
data one;
set sashelp.prdsale;
retain temp;
by region descending salary;
if first.region then
do;
temp = salary;
output;
end;
if last.region then
do;
range = salary - temp;
output;
end;
run;
What is the number of observation(s) written to the output data set for each region?
A. 0
B. 1
C. 2
D. 4
请问为什么选C?
16. The following program is submitted:
data numrecords;
infile cards dlm = ',';
input agent1 $ agent2 $ agent3 $;
cards;
jones,,brownjones,spencer,brown
;
run;
What is the value for the variable named AGENT2 in the second observation?
A. brown
B. spencer
C. ' ' (missing character value)
D. There is no value because only one observation is created.
请问为什么选D?有人给出解释:There is no double trail sign @@ in ‘INPUT’ statements.可是我还是不明白??请大牛指点,谢先!!!! |
|