SAS Certified Base Programmer 123 Questions (9)
A raw data record is listed below:
----|----10---|----20---|----30 son,Travis,
The following output is desired:
relation firstname son Travis
Which one of the following SAS programs reads the data correctly?
A.
data family / dlm = ','; infile 'file-specification'; input relation $ firstname $; run;
B.
option dlm = ','; data family; infile 'file-specification'; input relation $ firstname $; run;
C.
data family; infile 'file-specification' option dlm = ','; input relation $ firstname $; run;
D.
data family; infile 'file-specification'; input relation $ firstname $ / dlm = ','; run;
Topics:
SAS Base Questions |
2 Comments »
C
I think, there is a typo in C as well i.e. there is no option keyword required in infile statement before dlm.
option dlm = ‘,’;
can be replaced by
dlm = ‘,’;