SAS Certified Base Programmer 123 Questions (13)
A raw data file is listed below:
RANCH,1250,2,1,Sheppard Avenue,"$64,000" SPLIT,1190,1,1,Rand Street,"$65,850" CONDO,1400,2,1.5,Market Street,"80,050" TWOSTORY,1810,4,3,Garris Street,"$107,250" RANCH,1500,3,3,Kemble Avenue,"$86,650" SPLIT,1615,4,3,West Drive,"94,450" SPLIT,1305,3,1.5,Graham Avenue,"$73,650"
The following SAS program is submitted using the raw data file as input:
data work.condo_ranch; infile'file-specification' dsd; input style $ @; if style = 'CONDO' or style = 'RANCH' then input sqfeet bedrooms baths street $ price : dollar10.; run;
How many observations does the WORK.CONDO_RANCH data set contain?
A. 0
B. 3
C. 5
D. 7
Topics:
SAS Base Questions |
6 Comments »
D
How the answer is D? hope it is C .could you please explain??
Sorry i meant about B not C
@Mini: IF statement is not used as subsetting IF here.. It is just helping to instruct reading for specific style otherwise put missing values.
Still cant understand the logic, pl explain.
Style would get a value for all data lines (7 lines). The rest of the data on a line would only be read for 3 obs.