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 (June 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 25 Jun 2002 04:57:25 GMT
Reply-To:     julierog@ix.netcom.com
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Roger Lustig <trovato@BELLATLANTIC.NET>
Subject:      Re: Caution when using the RETAIN statement??!
Content-Type: text/plain; charset=us-ascii; format=flowed

John:

What you say is true--for the situation you describe. But what I wrote did not refer to that situation, but rather to the more general one that Simon--whose query began this thread--had presented.

And I do believe that I also pointed out in my reply that the RETAIN was already implicitly present for variables coming from an existing dataset, i.e., that they don't get initialized at the top of the data step.

Best,

Roger

John Whittington wrote:

> At 12:20 24/06/02 -0400, Roger Lustig wrote (in part): > >> Using the RETAIN statement to rearrange the order of variables is either >> dangerous or tedious--the latter because you have to write so much extra >> code to cover all the contingencies. > > > Roger, as I've just written in responses to Ron's comments, using RETAIN to > RE-ARRANGE order of variables from an existing dataset is never dangerous, > and never requires any extra code 'to cover contingencies'. On the > contrary, IN THE SITUATION I'VE DESCRIBED, the use of RETAIN for > re-ordering is totally foolproof, whereas the alternatives carry some > dangers and/or are more tedious. > > It is only when one is talking about 'primary ordering' (i.e. when some of > the variables to be 'ordered' are actually created in the data set also > doing the 'ordering') that one has to be aware of potential pitfalls of > RETAIN. > > Kind Regards > > > John > > ---------------------------------------------------------------- > Dr John Whittington, Voice: +44 (0) 1296 730225 > Mediscience Services Fax: +44 (0) 1296 738893 > Twyford Manor, Twyford, E-mail: John.W@mediscience.co.uk > Buckingham MK18 4EL, UK mediscience@compuserve.com > ----------------------------------------------------------------


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