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
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.
M.R. Stewart <at508@FreeNet.Carleton.CA> wrote in article
> 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
> 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,