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 (November 2011, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 29 Nov 2011 10:04:43 -0600
Reply-To:   Joe Matise <snoopy369@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Joe Matise <snoopy369@GMAIL.COM>
Subject:   Re: change order in output, proc tabulate, multilabel format
Comments:   To: bbser 2009 <bbser2009@gmail.com>
In-Reply-To:   <000001ccaeb0$62276d90$267648b0$@com>
Content-Type:   text/plain; charset=ISO-8859-1

Look up the 'NOTSORTED' option for PROC FORMAT, and ORDER=DATA option for the class statement.

-Joe

On Tue, Nov 29, 2011 at 10:03 AM, bbser 2009 <bbser2009@gmail.com> wrote: > Greetings! > > After running the code below, I got the output where the order of values of > num is like: Even, Odd, One, Two, from top to bottom. > I was wondering if there is a way to change this order to: One, Two, Odd, > Even, from top to bottom? Thanks a lot. > > Regards, Max > (Maaxx) > > proc format; > value tempfmt (multilabel) > 1='One' > 2='Two' > 1='Odd' > 2='Even'; > run; > > data new; > input num value; > cards; > 1 100 > 2 200 > 1 100 > ; > > proc tabulate data=new; > attrib num format=tempfmt.; > class num/mlf; > var value; > table num,value; > run; >


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