- %macro split;
- proc sql;
- create table tmp as
- select distinct date, _ric
- from work.a;
- select count(*)
- into :obs
- from work.tmp;
- %let obs=&obs.;
- select date, _ric, catx("_", "work.data", substr(_ric, 1, 13), put(date, yymmddn8.))
- into :date1-:date&obs., :ric1-:ric&obs., :setname1-:setname&obs.
- from work.tmp;
- quit;
- data
- %do i = 1 %to &obs.;
- &&setname&i
- %end;
- ;
- set work.a;
- select;
- %do i = 1 %to &obs.;
- when(_ric = "&&ric&i" and date = &&date&i) output &&setname&i;
- %end;
- end;
- %mend split;
- %split
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DATA_AXPA061203500_20120103 may be incomplete. When this step was stopped there were 0 observations and 106 variables.
WARNING: Data set WORK.DATA_AXPA061203500_20120103 was not replaced because this step was stopped.



雷达卡



京公网安备 11010802022788号







