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 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


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