| Date: | Tue, 19 Nov 2002 17:29:23 -0500 |
| Reply-To: | Kevin Auslander <kauslander@TERRECRS.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Kevin Auslander <kauslander@TERRECRS.COM> |
| Subject: | Re: proc report width= |
|
| In-Reply-To: | <3998.24.28.119.213.1037743082.squirrel@www.lucidan.com> |
| Content-Type: | text/plain; charset="us-ascii" |
The flow option is not acceptable because I need the box option. It
will not be too inefficient to find the max length for each variable.
But what if the max length is shorter than the length of the longest
word in the label. Then the labels will come out wrong. Is there
anyway to access the length of the longest word in each label in the
data step? I guess I could use proc contents. But that would require
many more steps. It seems like there should be a simpler way of doing
this.
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Suzanne D. McCoy
Sent: Tuesday, November 19, 2002 4:58 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: proc report width=
You could also just shortcut the entire issue by using a default width
for
the columns and the flow option. The only macro alternative I can think
of
off the top is my head is to bump through the entire dataset again to
determine the lengths via a max(length(for each variable)) and set them
to
macro variables, using dictionary.columns to determine the character
variables, but what is that going to do to the efficiency/runtime?
--
Suzanne D. McCoy
Lucid Analytics Corp.
"Intelligence Unleashed"
> I asked for this capability in PROC REPORT a while back; apparently
> there's not enough perceived demand to warrant the programming effort.
> If you want it, send mail to suggest@sas.com.
>
>
>
>
> --
> JackHamilton@FirstHealth.com
> Manager, Technical Development
> METRICS Department, First Health
> West Sacramento, California USA
>
>
>>>> Kevin Auslander <kauslander@TERRECRS.COM> 11/19/2002 1:33 PM >>>
> I find that I frequently need to set the width of each
> character variable manually when using proc report. I usually set it
> to
> a value that is equal to max(the longest word in the label, the length
> of the longest data value). Setting the width for each variable
> becomes
> very tedious when I have to create several reports with many variables
> each. I read in the help files that proc report will automatically
set
> the column width to accommodate the format of the variable. So what I
> need is a macro that will set the format of each variable to max(the
> longest word in the label, the length of the longest data value).
> Does
> anyone out there have a macro that does this? Or does anyone have a
> different solution to the problem. TIA
>
>
> Kevin
|