Date: Fri, 30 Mar 2007 10:15:03 -0700
Reply-To: bigD <diaphanosoma@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: bigD <diaphanosoma@HOTMAIL.COM>
Organization: http://groups.google.com
Subject: preloading formats, working on order, not label
Content-Type: text/plain; charset="iso-8859-1"
Hi,
Here's a vexing little problem.
I am producing reports that require a specific order for the rows and
columns. I make a format (notsorted) for all types of hsptls and
programs. Sas will put them in the right order, but it seems to be hit
or miss on the actual new label name. I made the labels shorter to fit
the table better, but some of the labels are still the long versions.
Here's some code.
What gives???
PROC FORMAT;
value $HSPTL_ORDER (NOTSORTED)
'long hospital name' = 'name1'
'very long hospitl name' = 'short name'
.
.
.
;
value $pgm_order
'very long pgm name'= 'short name'
'super duper long name' = 'short name1'
.
;
run;
proc tabulate data=new format=7.0 order = DATA ;
class PROGRAM1 /PRELOADFMT ;
CLASS hsptl /PRELOADFMT;
VAR separations;
TABLE PROGRAM1='' ALL='Total',
HSPTL*(SEPARATIONS=''*(sum='N' Pctsum<hsptl>='%'*f=pctfmt.))
ALL='Total'*SEPARATIONS;
FORMAT HSPTL $HSPTL_ORDER. PROGRAM1 $PGM_ORDER.;
RUN;
|