Hello,
You should tell us exactly what you want to do because
- SAS data step and procs have been designed to allow by group processing so that splitting datasets is seldom required.
- As such your macro does not seem to make much sense. For instance, in your test macro, you have a data null step in a loop, but this data step only contains a call symput with a constant first argument ("changelist") => &changelist. will have the value generated by the last call symput.
/* Test dataset */
data cars;
set sashelp.cars;
run;
/* Splitting datasets */
%let DS_SIZE=5;
data _NULL_;
set cars nobs=_nobs;
call symputx('NB_DS',ceil(_nobs/&DS_SIZE.));
run;
data _NULL_;
call execute('data ');
do i=1 to &NB_DS.; call execute(cats('cars',i)); end;
call execute('; set cars;');
do i=1 to &NB_DS.;
call execute(catx(' ','if', i-1,'< _N_/&DS_SIZE. <=', i, 'then output', cats('cars',i,';')));
end;
call execute('run;');
run;
/* Joining datasets */
data carsb;
set cars1-cars&NB_DS.;
run;
proc compare base=cars comp=carsb;
run;
... View more