大家好,
想知道sas base 123题中13 题if...then... 语句的用法? 题如下
QUESTION 13A raw data file is listed below:
RANCH,1250,2,1,Sheppard Avenue,"64,000"SPLIT,1190,1,1,RandStreet,"64,000"SPLIT,1190,1,1,RandStreet,"65,850"
CONDO,1400,2,1.5,Market Street,"80,050"
TWOSTORY,1810,4,3,Garris Street,"107,250"RANCH,1500,3,3,KembleAvenue,"107,250"RANCH,1500,3,3,KembleAvenue,"86,650"
SPLIT,1615,4,3,West Drive,"94,450"
SPLIT,1305,3,1.5,Graham Avenue,"$73,650"
The following SAS programme is submitted using the raw data file as input:
data work.condo_ranch;
infile'file-specification' dsd;
input style $@;
73,650"
ThefollowingSASprogramissubmittedusingtherawdatafileasinput:datawork.condoranch;infile′file−specification′dsd;
inputstif style = 'CONDO' or style = 'RANCH' then
input sqfeet bedrooms baths street $ price : dollar10.;
run;
How many observations will the output data set contain?
A. 0
B. 3
C. 5
D. 7
我知道@的用法, 跳到下一个input statement 继续。 如果input 语句嵌入在if... then... 语句中, 此时@ 还执行么?
QUESTION 14A raw data file is listed below:
RANCH,1250,2,1,Sheppard Avenue,"64,000"SPLIT,1190,1,1,RandStreet,"64,000"SPLIT,1190,1,1,RandStreet,"65,850"
CONDO,1400,2,1.5,Market Street,"80,050"
TWOSTORY,1810,4,3,Garris Street,"107,250"RANCH,1500,3,3,KembleAvenue,"107,250"RANCH,1500,3,3,KembleAvenue,"86,650"
SPLIT,1615,4,3,West Drive,"94,450"
SPLIT,1305,3,1.5,Graham Avenue,"$73,650"
The following SAS programme is submitted using the raw data file as input:
data work.condo_ranch;
infile'file-specification' dsd;
input style $@;
73,650"
ThefollowingSASprogramissubmittedusingtherawdatafileasinput:datawork.condoranch;infile′file−specification′dsd;
inputstif style = 'CONDO' or style = 'RANCH';
input sqfeet bedrooms baths street $ price : dollar10.;
run;
How many observations will the output data set contain?
A. 0
B. 3
C. 5
D. 7
想知道 13题和14题的区别。 谢谢大家, 还是小白 请多关照 。