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 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 18 Feb 2000 15:29:48 -0500
Reply-To:     "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject:      Re: Ordering Variables
Content-Type: text/plain; charset="iso-8859-1"

> From: Arslan [mailto:lara0@CARAMAIL.COM] > to order variable, i think you should use Length declaration > in data step

I always figured that the retain was gonna get folks in trouble. and agree, kinda more or less, with Arslan. However, still looking for the least amount of stuff to type I looked up the attribute statement and find that if you are willing to mess with something inconsequential, like your labels, you can use the attribute statement to 'reorder' variables.

data x; attrib x y z label = ''; input @1 x 1. @2 y 1. @3 z 1.; cards; 928 ; proc CONTENTS; data y; attrib z y x label = ''; set x; proc CONTENTS; RUN;

Don't be fooled by the fact that the vars are listed in alphabetical order in the CONTENTS listing. Check the VarNum as well as the position.

As if there were enough $0.02 on this subject. ... LOL

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov ---> cheerful provider of TESTED SAS code!*! <---


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