First, it is unclear whether you are talking about an instruction renamein proc datasetsor at a data step. If you do not need to do anything with the data, you should definitely use the proc datasets to do this, because otherwise (in the data step) you do not need to read / write each record in the data set, just change the variable names.
,
rename col1-col15=new1-new15;
, proc. . , , / 15 . , :
data _null_;
length myVar $ 1000;
*myVar='';
do i=1 to 15;
myVar=catx(' ',myVar,' ',cats('col',i,'=','new',i));
end;
call symput('rename',myVar);
run;
%put &rename;
proc datasets library=mylibrary;
modify mydataset;
rename &rename;
run;