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 (October 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 14 Oct 1999 10:56:26 -0600
Reply-To:     Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:      Re: Sorting by formatted values of variable(s). How?
Comments: To: J.Groeneveld@ITGROUPS.COM
Content-Type: text/plain; charset=us-ascii

"Jim Groeneveld" <J.Groeneveld@ITGROUPS.COM> wrote:

>Consider the following test program, that you should run, and look at the >result:

Is there some reason I would need to run this program in order to understand the question?

>Clearly some procedures explicitely ignore formatted values (in order to >perform numeric arithmetic with unformatted values), like UNIVARIATE, MEANS, >etc.. Other procedures allow the use of (permanently or temporary) >associated formats, like FREQ, TABULATE, REPORT, PRINT, etc.. >It appears PROC SORT ignores formats completely. I want to be able to >(pre)sort records (for REPORT) according to formatted values.

Why not let PROC REPORT do the sorting?

>Without >creating new variables with the formatted contents (via function PUT) to >sort by, how might it be possible to sort by formatted values?

proc sql;

create table b as select * from a order by put(a, myformat.);

quit;

-- JackHamilton@FirstHealth.com Development Manager, Technical Group METRICS Department, First Health West Sacramento, California USA


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