If you REALLY need to rename them......you can try:
data col_names (keep=name:);
set sashelp.vcolumn (where=(libname='WORK' and memname='HAVE' and substr(name,1,4)='VAR_'));
start=mdy(1,1,2010);
num=tranwrd(name,'VAR_','');
date=intnx('month',start,num-1);
name_yyyymm=cats('VAR_',put(date,yymmn6.)); /*VAR_201001*/
name_monyyyy=cats('VAR_',put(date,monyy7.)); /*VAR_JAN2010*/
name_mon_yyyy=cats('VAR_',put(date,monname3.),'_',put(date,year4.)); /*VAR_Jan_2010*/
run;
proc sql noprint;
select catx('=',name,name_mon_yyyy) into :renames separated by ' ' from col_names;
quit;
proc datasets nolist library=work;
modify have;
rename &renames;
run;
quit;
... View more