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 (January 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Hari Prasadh <excel_hari@YAHOO.COM>

Hi Hari,

DATA New; RETAIN [variable list in desired order]; SET Old; RUN;

This is a popular, often asked Q; see the SAS-L archives.

Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant home.hccnet.nl/jim.groeneveld

My new computer is about to learn what my old one forgot.

[common disclaimer]

On Wed, 18 Jan 2006 12:39:36 -0800, Hari <excel_hari@YAHOO.COM> wrote:

>Hi, > >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). > >Regards, >Hari >India


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