Date: Thu, 24 Feb 2005 14:14:19 -0500
Reply-To: "Fehd, Ronald J. (PHPPO)" <RJF2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (PHPPO)" <RJF2@CDC.GOV>
Subject: Re: Re-ording columns in a data set
Content-Type: text/plain; charset="US-ASCII"
> From: K Fernandes
> How might one go about re-ordering the columns in a data set
> so that they
> appear in a certain order when the table is opened?
this is one of our (in)famous FAQ:
use either
DATA New;
retain VarZ VarX VarY;
set Old;
or
DATA New;
attrib VarZ VarX VarY;
set Old;
what's the difference?
no programming allowed in the data step when using retain.
whereas you -can- do some data manipulation when using attrib.
check our most excellent archives:
http://www.listserv.uga.edu/archives/sas-l.html
search for: reorder
subject contains:
author's address:
since:
until:
Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov
FAQ: How to use SAS-L
http://www2.sas.com/proceedings/sugi29/247-29.pdf