You can currently use the dataset option RENAME= to change the NAME used for a variable.
It would increase flexibility if you could also change other attributes of the variables, such as the FORMAT, INFORMAT or LABEL using a similar syntax. To avoid conflict with the existing LABEL= option for setting the member name and to follow a similar naming convention as the RENAME= option we might call these options REFORMAT=, REINFORMAT= and RELABEL=. It should be possible to do it one both input and output dataset references.
Example:
data want;
set sashelp.class (reformat=(age=5.2));
run;
Here is problem that made me think of this. I was able to attach formats to variables being created with PROC TRANSPOSE by adding a FORMAT statement, but it generated WARNINGs in the log.
88 %let fmtlist=x xfmt. z zfmt.;
88 proc transpose data=have out=want(drop=_name_) ;
89 by id formset ;
90 id var_name;
91 idlabel var_label;
92 var var_value;
93 format &fmtlist;
WARNING: Variable X not found in data set WORK.HAVE.
WARNING: Variable Z not found in data set WORK.HAVE.
94 run;
NOTE: There were 12 observations read from the data set WORK.HAVE.
NOTE: The data set WORK.WANT has 4 observations and 5 variables.