24.Given the following raw data records:
----|----10---|----20---|----30
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;
-------------------------------------
答案是D, 我能明白dsd dlm在这里面连用的效果。但是有两点不解, 1)是format input的用法,为什么是bdate : mmddyy10.而不是bdate mmddyy10. 为什么这里需要一个冒号?
2)是B项直接用dsd='*'是不符合规范的吗?
谢谢~