Date: Wed, 5 Aug 1998 14:24:40 -0400
Reply-To: "abdu.elnagheeb(a)nationsbank.com"
<abdu.elnagheeb@NATIONSBANK.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "abdu.elnagheeb(a)nationsbank.com"
<abdu.elnagheeb@NATIONSBANK.COM>
Subject: Re: How to order variables? (THANKS)
I want to thank all those who responded to my question above. To
summarize:
In order to re-order variables in a data set use:
(1) DATA NewName ;
RETAIN variables in order you want ;
SET OldName ;
RUN;
or
(2)DATA NewName ;
LENGTH variables in order you want SOMELENGTH. ;
SET OldName ;
RUN;
Thanks again.
abdu
<<<<<<<<
Hello all,
I have read sometime ago on this list that in order to change the
order of variables in a data set you use RETAIN. I have tried that
with no success. Please, run the prgm below to see if the order does
change. It didn't for me( it is I X Y in both data sets). Thanks for
your help.
abdu
*****======prgm==================;
data test ;
do i=1 to 5 ;
x=ranuni(9) ;
y= ranuni(1);
output;
end;
run;
proc print; Title "Test"; run;
data test2 ;
set test ;
retain y x i ; **to change order***;
run;
proc print;title "Test2"; run;