Maybe this code is better.
[pre]
data temp;
infile datalines dlm=' ';
input group x1_N x1_nmiss x1_mean x1_stddev x1_median;
datalines;
1 201 0 15.3 5.2 14.9
2 199 0 17.6 4.9 17.5
3 203 0 18.9 5.7 18.6
;
run;
options mprint mlogic symbolgen;
%macro rename;
proc sql ;
select name from dictionary.columns where libname='WORK' and memname='TEMP' and name like 'x1%';
select catx(' ',name,'=',scan(name,2,'_'))
into : name1 - : name&sqlobs.
from dictionary.columns where libname='WORK' and memname='TEMP' and name like 'x1%';
quit;
proc datasets library=work memtype=data nolist;
modify temp;
rename %do k=1 %to &sqlobs.;
&&name&k..
%end;
;
quit;
%mend;
%rename
[/pre]
Ksharp