Hi.
It looks like you want to split dataset?
%macro split;
proc sql ;
select distinct sex from sashelp.class;
select distinct sex
into : sex1 - : sex&sqlobs.
from sashelp.class;
quit;
data %do i=1 %to &sqlobs.;
&&sex&i
%end;
;
set sashelp.class;
select (sex);
%do j=1 %to
&sqlobs.;
when("&&sex&j") output &&sex&j;
%end;
otherwise;
end;
run;
%mend;
%split
[pre]
Ksharp
[/pre]
Message was edited by: Ksharp
... View more