Hi: The bigger question for me is whether you want only output the rows where STYLE is RANCH or CONDO. Right now, you're reading every row, but only catching the other variables for the RANCH or CONDO rows. I don't see the point of outputting the basically empty rows for the other STYLE types. Cynthia
DATA work.condo_ranch;
INFILE datalines DSD DLM=',';
INPUT style : $10. @;
** use subsetting if to limit output rows;
if style in ('RANCH' ,'CONDO');
INPUT sqfeet bedrooms baths street : $20. price : dollar10.;
datalines;
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"
;
RUN;
title 'condo_ranch made with subsetting IF';
proc print data=work.condo_ranch;
run;
produces this output:
... View more