dear all,
When I use the following code to rename a variable name, it works well.
proc means median maxdec=2 data=tmp;
var x1;
class group;
ods output summary=tmp1;
data tmp1;set tmp1(rename=x_median=xmedian);
run;
When I use a following macro to rename the variable name, it doesn't work any way.
%macro rename(data=,var=,group=);
proc means median maxdec=2 data=&data;
var &var;
class &group;
ods output summary=tmp1;
data tmp1;set tmp1(rename=&&var_median=xmedian);
run;
%mend;
How can I to revise the macro? Thanks in advance for your time and patience.