|Date: ||Wed, 31 Jan 2001 12:23:03 -0500|
|Reply-To: ||Howard Schreier <Howard_Schreier@ITA.DOC.GOV>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Howard Schreier <Howard_Schreier@ITA.DOC.GOV>|
|Subject: ||Re: Change Column Position|
But the RETAIN must go before the SET.
On Wed, 31 Jan 2001 11:56:12 -0500, Shilling, Brian [PRI]
>A very easy way (but maybe not the most efficient) is to add a datastep
>a retain statement, as follows:
> set a;
> retain a b c d e f g .......; (in the new order requested)
>Hope this helps!
>> -----Original Message-----
>> From: CWF [SMTP:wf_cheung@YAHOO.COM]
>> Sent: Wednesday, January 31, 2001 11:14 AM
>> To: SAS-L@LISTSERV.UGA.EDU
>> Subject: Change Column Position
>> Hi Everybody,
>> I would like to ask which SAS command can change the position of column
>> within a dataset.
>> e.g. Original: Variable Sequence A, B, C, D
>> After Change: Variable Sequence B, D, C, A