LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 15 Aug 2005 21:32:55 -0400
Reply-To:     Lou <lpogodajr292185@COMCAST.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Lou <lpogodajr292185@COMCAST.NET>
Subject:      Re: Arranging variables
Comments: To: sas-l@uga.edu

"Vladislav" <vladislav.moltchanov@ktl.fi> wrote in message news:ddll4d$93l$1@oxygen.ktl.fi... > Dorfman, Paul wrote: > > > > The simple fact in question is that if any variables are included in > > RETAIN coded as the first instruction after the DATA statement, NOTHING > > coded in the step thereafter can change their order. > > > > You are simply right. > I have been using Retain for retaining the values. For this pruposes > retain statement have been located somewhere in the body of the data > step, where usually the variables in question were generated. > > For me the idea of reodering the variables in the data set sounds very > strange, I can't see any reason for this.

As a programmer, I'd agree - there's no operational point. For the most part, a program doesn't care what order variables occur in a dataset. However, often we're in the position of delivering datasets to be used by non-programming types - they'll examine them in the SAS viewer, or copy the contents to a spreadsheet. These people want and expect to see the variables in a certain order - usually the variables comprising the data set key first, then the "data" variables in some logical sequence, and if they receive periodic updates, they want it in the same order every time. Usually, these people want the dataset sorted some specific way as well.

As a programmer, I have to admit, it's somewhat easier to make sure nothing's been left out if a specific order is specified.


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