The following SAS program is sumbitted:
data WORK.INFO;
infile ‘DATAFILE.TXT’;
input @1 Company $20. @25 State $2. @;
if State=’ ‘ then input @30 Year;
else input @30 City Year;
input NumEmployees;
run;
How many raw data records are read during each iteration of the DATA step?
A. 1
B. 2
C. 3
D. 4
好像正确答案是A哎 类似的http://sascert.blogspot.com/2006/12/base-sas_116630508906579290.html大家也都选A
这题中 if State=’ ‘ 时input最后是没有@的,所以input NumEmployees;会成为单独的data record
Have to say you are wrong. You need to understand how @ works rather than just hard-memorize answers. The quiz from your link is different from this one – it’s using @ all through to the end thus only 1 record is read. But this one here doesn’t.