Hi all, I'm trying to create a table for each version of a variable in a parent table. Currently I am using the following code:
%let TABLE=libref.tablename
%let COLUMN=columnname
proc sql noprint;
select distinct
cat("DATA out_",compress(&COLUMN.,'','kad'),
";set &TABLE.(where=(&COLUMN.='" ,&COLUMN.,
" ')); run;") length=500 into :allsteps separated by ';'
from &TABLE.;
quit;
%macro runSteps;
&allsteps.;
%mend;
%runSteps;My problem is that I would like to limit to rows of the output tables to a certain number say 5. But I can't quite figure out how to fit obsout into this code. Putting it in the proc sql statement just prevents the looping of of the runSteps macro.
Thanks for your help.