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 (February 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 3 Feb 2000 17:11:39 GMT
Reply-To:     JP <cruguel@DMS.UMONTREAL.CA>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         JP <cruguel@DMS.UMONTREAL.CA>
Subject:      Re: Order of variables question

Hi Maggie,

One solution is to use a Retain statement (with the list of the var in the order you want). However you must be very careful with this as it may lead to some... how to say, retaining values. I used it quite while ago, and I remember having trouble with it. It was really hard to find out why. You can do a search on deja.com on this forum (with retain in the title of the post) for past articles. Someone suggested an easy way to do it, I think it involved the lenght or the label statement.

HTH,

JP

M.R. Stewart <at508@FreeNet.Carleton.CA> wrote in article <87cavi$8l9$1@freenet9.carleton.ca>... > > Hi: > > I am making changes to a large dataset. A new coding system changed a > number of the variables from numeric to character. I have the old file > with old numeric variables interspersed among variables that do not need > to be changed, and the new dataset which has only the new char variables. > If I drop the old vars and merge (one step), the new vars go either to the > beginning or end. > If I break both the old and new datasets into chunks and merge them in a > specific sequence, I can retain my order, but it's a lot of fiddling. > > I know as well, I can use a length statement, but that involves writing > name,length, type of every variable. > > Is there an easier method I am missing? > > Thanks in advance, > > Maggie >


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