Date: Wed, 18 Jan 2006 16:20:01 -0500
Reply-To: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Subject: Re: Ordering variables in data file
RETAIN [variable list in desired order];
This is a popular, often asked Q; see the SAS-L archives.
Regards - Jim.
Jim Groeneveld, Netherlands
Statistician, SAS consultant
My new computer is about to learn what my old one forgot.
On Wed, 18 Jan 2006 12:39:36 -0800, Hari <excel_hari@YAHOO.COM> wrote:
>2 some-what related doubts:-
>a) How do I change the order of variables in SAS. The keep
>option/statement is there for retaining variables but it doesnt change
>the order. (In SPSS keep canges the order as well)
>b) I can probably handle a) (in roundabout manner) by using proc SQL
>where I write the variables within select staement in the order I want
>it to appear in file. But again, in SAS is there a easy (and
>"sensical") method to output all the variables in data file in to lets
>say Log or output window. (In SPSS one can paste the variables to
>editor using paste syntax from GUI pull-down).