a********a 发帖数: 3176 | 1 I think I figured out one way to get the new list:
%Do I = 1 %to &NVar;
%let k=1;
%do %while (%Quote(%Scan(&&Var_&I, &K, %Str( ))) ^= );
%let newvar = %Quote(%Scan(&&Var_&I, &K, %Str( ))) ;
proc means data=&data noprint;
var &newvar;;
where taapart=1;
output out=&newvar min=min max=max;
run;
data &newvar;
length VARNAME $ 20.;
set &newvar;
VARNAME="&newvar";
proc append base=newvar data=&newvar force;
run;
%let k = %eval(&k + 1);
%let newvar = %scan(&&Var_&I, |
|