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 (December 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 30 Nov 2008 21:29:59 -0800
Reply-To:     jasonm@UCLA.EDU
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         J M <jasonm@UCLA.EDU>
Subject:      Re: Sorting Formats
Comments: cc: Arthur Tabachneck <art297@NETSCAPE.NET>
In-Reply-To:  <200812010451.mAUBl8RY013214@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed"

I believe the problem is that I'm using if j=5 then catf=put(age,cat_5.); How do I specify that cat_5 is a numeric format? I received an error when using the function putn.

Quoting Arthur Tabachneck <art297@NETSCAPE.NET>:

> Jason, > > Show the list the code where the order is coming out wrong. In the > following example it comes out in your desired order: > > proc format; > value cats > 0-<3="0-<3" > 3-<10="3-<10" > 10-<20="10-<20" > 20-high=">=20" > ; > run; > > data have; > input x; > format x cats.; > cards; > 1 > 2 > 3 > 4 > 5 > 10 > 12 > 14 > 20 > 21 > 22 > ; > > proc freq data=have; > tables x; > run; > > Art > -------- > On Sun, 30 Nov 2008 20:35:03 -0800, J M <jasonm@UCLA.EDU> wrote: > >> I would like for these categories >> >> proc formats >> value cats >> 0-<3="0-<3" >> 3-<10="3-<10" >> 10-<20="10-<20" >> 20-high=">=20" >> ; >> >> to be sorted as >> 0-<3 >> 3-<10 >> 10-<20 >>> =20 >> >> instead of >> 0-<3 >> 10-<20 >> 3-<20 >>> =20 >> >> Any suggestions? >


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