数据集a
data a;
input g c;
cards;
1 2
1 10
2 5
;
run;
想根据g将数据集a拆分为两个数据集,实际中的数据g有很多。
我写的程序
%macro seperate();
proc sql;
create table tmp.tmp&CUSIP
as select *
from eps.slt_rlt
where CNUM="&CUSIP";
quit;
%mend;
data _null_;
set ten;
call symput('CUSIP',CNUM);
%seperate();
run;
只能得出最后一组的数据