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?
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
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?
>creating new variables with the formatted contents (via function PUT) to
>sort by, how might it be possible to sort by formatted values?
create table b as
order by put(a, myformat.);
Development Manager, Technical Group
METRICS Department, First Health
West Sacramento, California USA