Tips:PROC TRANSPOSE, using the IDLABEL to label the variable created
From sasCommunity
When using PROC TRANSPOSE, the ID statement is used to tell SAS how to NAME the variables resulting from the transpose. You can also tell SAS how to LABEL the resulting variables, by using the value of a variable in the original dataset, just as is done with the ID statement. For example:
proc transpose data=test out=newtest prefix=visit; by subjid; var labres; id visit; idlabel visitl; run;
SAS will name the variables VISITx .. VISITy based on the values in the VISIT variable. And will ALSO label VISITx with the corresponding value from VISITL on the given record and label VISITy with the corresponding value from VISITL on the given record for all created variables.
Submitted by AYW Training and Consulting. Contact me at my Discussion Page.
....see also
