LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (August 1998, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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;


Back to: Top of message | Previous page | Main SAS-L page