Date: Tue, 31 Aug 2004 14:01:36 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: Creating a notsorted date format
Hi Dianne -
Have you tried the "<" range symbol for excluding the endpoints?
proc format &fmtlib;
value weekcol (notsorted)
low - &ref = "Prior to &prtref"
&ref <-< "&StartDate"D = "Through Week Prior to &Startdate"
"&StartDate"D -
"&ReportDate"D = "Week Ending &ReportDate"
;
HTH!
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Dianne
Rhodes
Sent: Tuesday, August 31, 2004 12:20 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Creating a notsorted date format
Hi everyone
I had some help creating this format for my production reports.
Now I would like to try to control the order so that the buckets are in this
order:
35 options fmtsearch=(srchfmt) ;
36 proc format &fmtlib;
37 value weekcol (notsorted)
38 low - &ref = "Prior to &prtref"
39 Other = "Through Week Prior to &Startdate"
40 "&StartDate"D - "&ReportDate"D = "Week Ending &ReportDate"
41
42 ;
NOTE: Format WEEKCOL has been output.
43 run;
But as fmtlib shows me it always puts the "OTHER" at the end instead of in
the middle:
----------------------------------------------------------------------------
| FORMAT NAME: WEEKCOL LENGTH: 31 NUMBER OF VALUES: 3
|
| MIN LENGTH: 1 MAX LENGTH: 40 DEFAULT LENGTH 31 FUZZ: STD
|
|--------------------------------------------------------------------------|
|START |END |LABEL (VER. 8.2
31AUG2004:15:09:44)|
|----------------+----------------+----------------------------------------|
|LOW | 16100|Prior to 30JAN04
|
| 16304| 16310|Week Ending 27AUG2004
|
|**OTHER** |**OTHER** |Through Week Prior to 21AUG2004
|
And this is the order they come out in my tabulate.
proc tabulate data=report order=data missing;
class Createdate / preloadfmt ;
class reviewer ;
var countcase ;
label countcase='Count'
Createdate='Time Period'
reviewer='Reviewer'
;
keylabel
sum=' '
all='Total'
;
tables (reviewer all), (createdate all)*countcase*(sum*f=10.
colpctsum*f=5.1 )
/rts=25 ;
format createdate weekcol. reviewer /*$initial.*/ $lastnme. ;
run;
Any one have any great ideas? Thanks to all.
Dianne Louise Rhodes
Sr. Systems Analyst
Westat