Hi All:
I wander if there is any other ways to rearrange var. order in Data step ?
Methods:
ATTRIB statement but we have to put length, format... . , which is not handy.
data attrib_method;
attrib day month year date sales length=3;
set sashelp.retail(obs=5);
run;
If we use RETAIN before SET statement, will this sometimes accidentally change the variable values
data retain_method;
retain day month year date sales;
set sashelp.retail;
run;
However, unless the sole purpose of a data step is to re-order variables, the use of RETAIN for this purpose can lead to unwanted results when the value of any ‘retained’ variable is carried over from one data step iteration to another.
Are there any other ways?
thanks all in advance.
purple
... View more