SAS Base (24)

Given the following raw data records:

----|----10---|----20
Susan*12/29/1970*10
Michael**6

The following output is desired:

Obs employee bdate years
1 Susan 4015 10
2 Michael . 6

Which SAS program correctly reads in the raw data?
A.
data employees;
infile ‘file specification’ dlm=’*’;
input employee $ bdate : mmddyy10. years;
run;

B.
data employees;
infile ‘file specification’ dsd=’*’;
input employee $ bdate mmddyy10. years;
run;

C.
data employees;
infile ‘file specification’ dlm dsd;
input employee $ bdate mmddyy10. years;
run;

D.
data employees;
infile ‘file specification’ dlm=’*’ dsd;
input employee $ bdate : mmddyy10. years;
run;

Check Answer
Answer: D

注解:考点是DLM和DSD连用,具体参考SAS Base (2)

Leave a Reply

Your email address will not be published. Required fields are marked *