p******r 发帖数: 1279 | 1 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。
可我觉得这个题怎么要看具体的raw data才能知道是每次循环是1个record还是2个
record呢?
如果raw data是下面这个样子,那每次iteration不就读入2个record了吗??
companyA NC raleigh 2001
200
companyB 2002
300
companyC CA losangeles 1998
.. |
s*******r 发帖数: 769 | 2 correct answer is B, 2.
【在 p******r 的大作中提到】 : 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
|
l**********9 发帖数: 148 | 3 The first INPUT ends with a @, so SAS will continue reading this record
rather than jump to the next. However, the second INPUT ends without @, so
the next record(NumEmployees) will be read. So there will be two records in
one iteration, whatever how the raw being formed. |
p******r 发帖数: 1279 | 4 yeah 我后来怎么想都是觉得应该是B 2,看来是我之前的标准答案错了~~ |
p******r 发帖数: 1279 | 5 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。
可我觉得这个题怎么要看具体的raw data才能知道是每次循环是1个record还是2个
record呢?
如果raw data是下面这个样子,那每次iteration不就读入2个record了吗??
companyA NC raleigh 2001
200
companyB 2002
300
companyC CA losangeles 1998
... |
s*******r 发帖数: 769 | 6 correct answer is B, 2.
【在 p******r 的大作中提到】 : 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
|
l**********9 发帖数: 148 | 7 The first INPUT ends with a @, so SAS will continue reading this record
rather than jump to the next. However, the second INPUT ends without @, so
the next record(NumEmployees) will be read. So there will be two records in
one iteration, whatever how the raw being formed. |
p******r 发帖数: 1279 | 8 yeah 我后来怎么想都是觉得应该是B 2,看来是我之前的标准答案错了~~ |
k**i 发帖数: 10191 | 9 标准答案错了,是不是考试的时候还是选A才能得分呀? |
w******d 发帖数: 90 | 10 I tried on computer. only 1 row input.
Num
Obs Company State Year City Employees
1 companyA NC raleig 00 . 200 300 |