@Jennifer:
I am not sure if you need to pass you statistics to macro variables to be used in another data step. In general, it is better to use little macros; and to avoid the global macro variables altogether. There are inevitable losses of precision involved when you convert numeric values to characters and back. Not using global macro vars, thus, your results can be accurate. In addition, the code gets (much) simpler without global macro vars in many cases. For instance, you can do something like below:
proc summary data=sashelp.class;
var age;
output out=stat(drop=_:) min(age)=minAge max(age)=maxAge;
run;
data _null_;
if _n_ = 1 then set stat;
do age = minAge to maxAge;
put age=;
end;
stop;
run;
/* on log
age=11
age=12
age=13
age=14
age=15
age=16
*/
... View more