LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 1997, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 21 Mar 1997 18:24:41 -0500
Reply-To:     flickner@erols.com
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Pat Flickner <flickner@EROLS.COM>
Organization: Flickner Enterprises
Subject:      Re: Change the position of the variable in SAS data set
Content-Type: text/plain; charset=us-ascii

Philip Primak wrote: > > Is there a way to change the position of the variable in SAS data set. > I have SAS data set and PROC CONTENTS gives me the output like this: > > # Variable Type > -------------------------- > 1 PATID num > 2 AGE num > 3 SEX char > . > . > . > > I need to make SEX 2 and AGE 3. > > Thanks in advance for any help. > > Philip Primak

Philip,

Why? If it's because of proc print, you can alway use VAR to reorder the variables. Otherwise, you can read the SAS set into another SAS set and do (keep=patid sex age). Otherwise, is it really worth the extra trouble?

Pat Flickner flickner@erols.com


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