I would like to convert a table of 1x1:
max
5
into a variable to do a for loop and searching on the internet I have not found anything.
To create a variable from a table (1x1):
proc sql noprint;
select max into :macro_make
from table;
quit;
%put ¯o_make.;
And then do the loop to repeat a table n times:
data want;
set have;
run;
%macro append(n);
%do i = 1 %to (&n-1);
Proc append base=want data=have;
run;
%end;
%mend append;
%append(¯o_make);
You know how can I deal with this?