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 (July 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 19 Jul 2004 10:59:57 -0400
Reply-To:     Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject:      Re: Help: display order

ORDER=FORMATTED is not applicable because RANGE does not have a format associated with it. The fact that is derived indirectly from the formatted value of another variable means nothing.

I think ORDER=DATA should work in this case.

For explicit control, look into the CLASSDATA= option. You can build the necessary dataset either from the original data or from your format library (using PROC FORMAT's CNTLOUT= option).

On Fri, 16 Jul 2004 13:24:33 -0700, Cathy <cathydwu@YAHOO.COM> wrote:

>Hi all: > >Thank you in advance for your help. > >I have serveral variables, and I use format to group them to get freq >and save the freq/percent into a file. > >Later, I want to create report/plot and I have the problem to properly >display them. I wish the display order is the same as defined in the >format. I have tried to use 'order = formatted' or 'order=data' in >'proc tabulate'. Sometimes it displays in order, sometimes not. > >The following is the simplified program. > >============================== >data a; >input score group $; >datalines; >0 a >35 b >23 a >15 c >. d >12 a >78 c >46 a >23 b >; >run; >proc format; >value score . = 'missing' > low - 0 = '<= 0' > 0 <- 10 = '0-10' > 10 <- 20 = '10-20' > 20 <- 30 = '20-30' > 30 <- 40 = '30-40' > 40 - high = '> 40'; >run; >ods output OneWayFreqs(match_all=datasetnames)=freqout; >ods listing close; > >proc freq data = a; >table score/ missing; >format score score.; >run; > >ods listing; >ods output close; > >data b; >set freqout; >length range $20; >range = left(F_score); >run; > >proc tabulate data = b missing order=formatted; >class range; >var percent; >table range, percent ; >run; > >=========== >Thanks. > >Cathy


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