|
On Thu, 11 Jul 2002 09:36:10 +1000, Philip_Crane@WORKCOVER.VIC.GOV.AU wrote:
>Gabriel
>
>There is a macro with accompanying discussion at
>www.sas.com/service/techtips/quicktips/squeeze.html that might be useful
>for you to look at.
>
>Philip
>
>
>
> Gabriel
> <demombynes@YA To: SAS-L@LISTSERV.UGA.EDU
> HOO.COM> cc:
> Sent by: Subject: minimizing length
of variables
> "SAS(r)
> Discussion"
> <SAS-L@LISTSER
> V.UGA.EDU>
>
>
> 11/07/2002
> 06:28 AM
> Please respond
> to Gabriel
>
>
>
>
>
>
>Does anyone have a macro written that will minimize the length of all
>variables in a dataset?
>
>Thanks,
>Gabriel
>Ph.D. Candidate
>Department of Economics
>UC-Berkeley
I think, that's very hard! E.g., what will you do with numeric variables?
The problem is: nobody knows how much significant digits you'll need! The
problem there is NOT, whether the contents fit into the variables. They
will, because of type floating point. So you can use the shortest num-type,
your SAS will allow (depending on OS). But maybe the results are not ok!
If your goal is, to save disk-space, have a look at the option COMPRESS=. A
very efficient setting is COMPRESS=BINARY in V8 (not available in V6, only
COMPRESS=YES). A side-effect is, you also have shorter elapsed times (not
always, but often), because you have less IO-traffic. The costs are longer
CPU-times, because it is needed for the compress / decompress.
|