untested, of course options mprint mlogic symbolgen;
%macro spDS;
%local dsCnt inlibref inmember i;
proc sql noprint ;
create table work.selection as
select libname, memname
from sashelp.vtable
where libname = 'SERETIDE'
;
select count(*) into :dsCnt from sashelp.vtable where libname='SERETIDE' ;
quit;
%do i = 1 %to 5;
data _null_;
set work.Selection;
call symput("inlibref", strip(libname));
call symput("inmember", strip(memname));
run;
proc sort data=&inlibref..&inmember. out = strans..&inmember
(drop = subjectstatus form formentrydate subjectvisitformid);
by subjectid;
run;
%end;
%mend;
%spDS();
... View more