On Thu, 11 Jul 2002 09:36:10 +1000, Philip_Crane@WORKCOVER.VIC.GOV.AU wrote:
>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.
> <demombynes@YA To: SAS-L@LISTSERV.UGA.EDU
> HOO.COM> cc:
> Sent by: Subject: minimizing length
> 06:28 AM
> Please respond
> to Gabriel
>Does anyone have a macro written that will minimize the length of all
>variables in a dataset?
>Department of Economics
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.