|
Hi,
I use PROC MEANS to get Min and Max of the value of a numerical variable,
see codes below.
Data minmax;
input num;
datalines;
1
2
3
;
run;
Proc means data=minmax noprint;
var num;
output out=range max=last min=first;
run;
Then I use CALL SYMPUTX to assign the min & max value to 2 macro variables,
see codes below,
Data _null_;
set range;
if _n_=1 then do;
call symputx ("start", first);
call symputx ("end", last);
stop;
end;
run;
Is there any other way (excluding Proc Sql) to skip Proc Means while
achieving the same goal: assign the min & max value to 2 macro variables ?
Thanks,
Jerry
|