Question 15.
data numrecords;
infile 'file-specification';
input @1 patient $15. relative $ 16-26@;
if relative='children' then
input @ 54 diagnosis $15. @;
else if relative= 'parents' then
input @28 doctor $15. clinic $ 44-53 @54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step during execution?
A.1 B.2 C.3 D.4
Question 39.
A raw data file is listed below:
John McCloskey 35 71
June Rosesette 10 43
TinekeJones 9 37
The following SAS program is submitted using the raw date file as input:
data work.homework;
infile 'file-specification';
input name $ age height;
if age LE 10;
run;
How many observtions will the WORK.HOMEWORK data set contain?
答案选的是3个,是不是因为当读到第一个和第二个age的时候是missing value,而missing value也是LE 10的,所以是3个observation?
Question 72.
The following SAS program is submitted:
data work,test;
First='Ipswich, England';
City=substr(First,1,7);
City_Country=City!!'; '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?
B. Ipswich, England
D. Ipswich , England
(答案选D,但我不明白为什么用了substr()函数以后给City的长度为8了,不是应该是和First的长度是一样的么?)