如题。代码如下。问题是,如何把新变量stats加入到数据集trystats中?第一次发帖提问,先谢过各位大神!
data trystats;
infile 'e:\try01.csv' delimiter =',' MISSOVER DSD lrecl=32767;
format number $6.;
input number $ ocf icf fcf cf stats $;
select;
when(ocf ge 0 and icf ge 0 and fcf ge 0) put stats='aaa';
when(ocf ge 0 and icf ge 0 and fcf lt 0) put stats='aab';
when(ocf ge 0 and icf lt 0 and fcf ge 0) put stats='aba';
when(ocf ge 0 and icf lt 0 and fcf lt 0) put stats='abb';
when(ocf lt 0 and icf ge 0 and fcf ge 0) put stats='baa';
when(ocf lt 0 and icf ge 0 and fcf lt 0) put stats='bab';
when(ocf lt 0 and icf lt 0 and fcf ge 0) put stats='bba';
otherwise put stats='bbb';
end;
run;