|
|
Compress SAS dataset without recreating
Hello All,
Is there any way to compress a SAS dataset without recreating it?
I'm aware of the option COMPRESS=YES in the data or proc step, and I
don't want to use this as a global option as it would unnecessarily
compress the small datasets.
While in the process of recreation, it is taking up huge amount of
space.
Is there something like the one below (the one below is not going to
work, this has thrown me an error) where it just compresses the
existing one without recreating it?
proc datasets lib=work;
compress class;
quit;
Any help or ideas would be highly appreciated.
Thanks
Sri
|
|
0
|
|
|
|
Reply
|
Sri
|
10/13/2010 3:07:38 PM |
|
On Oct 13, 11:07=A0am, Sri <subhadra...@gmail.com> wrote:
> Hello All,
>
> Is there any way to compress a SAS dataset without recreating it?
>
> I'm aware of the option COMPRESS=3DYES in the data or proc step, and I
> don't want to use this as a global option as it would unnecessarily
> compress the small datasets.
>
> While in the process of recreation, it is taking up huge amount of
> space.
>
> Is there something like the one below (the one below is not going to
> work, this has thrown me an error) where it just compresses the
> existing one without recreating it?
>
> proc datasets lib=3Dwork;
> compress class;
> quit;
>
> Any help or ideas would be highly appreciated.
>
> Thanks
> Sri
With the NOCLONE and DATECOPY options of PROC COPY in SAS version 9
you can convert datasets without losing the original label and
creation dates.
*----------------------------------------------------------------------;
* Copying datasets adding compression ;
*----------------------------------------------------------------------;
%let path=3D.;
options compress=3Dyes ;
libname in "&path";
libname out "&path";
proc copy inlib=3Din outlib=3Dout noclone datecopy memtype=3Ddata ;
run;
|
|
0
|
|
|
|
Reply
|
Tom
|
10/13/2010 5:08:09 PM
|
|
Hi
You can use compress=yes as a data set option, i.e. data
test(compress=yes).
To compress an already existing data set you will have to re-create it
as compressing means to store the data physically different (compress
is not just a data set attribute).
HTH
Patrick
|
|
0
|
|
|
|
Reply
|
Patrick
|
10/14/2010 4:31:38 AM
|
|
Compression by definition recreates the dataset. You can achieve it
in SAS or in your system.
To avoid SAS compression in WinXP you can define a folder as
compressed in Windows, allocate as a library, and then target it.
Here a 10mb file is also stored as 4.4mb in a "zippy" subfolder I made
in my default.
libname not '.\';
libname zippy '.\zippy\';
data not.zipped zippy.zipped;
do i=3D1 to 1.3e6;
output;
end;
run;
hth
Paul Choate
On Oct 13, 8:07=A0am, Sri <subhadra...@gmail.com> wrote:
> Hello All,
>
> Is there any way to compress a SAS dataset without recreating it?
>
> I'm aware of the option COMPRESS=3DYES in the data or proc step, and I
> don't want to use this as a global option as it would unnecessarily
> compress the small datasets.
>
> While in the process of recreation, it is taking up huge amount of
> space.
>
> Is there something like the one below (the one below is not going to
> work, this has thrown me an error) where it just compresses the
> existing one without recreating it?
>
> proc datasets lib=3Dwork;
> compress class;
> quit;
>
> Any help or ideas would be highly appreciated.
>
> Thanks
> Sri
|
|
0
|
|
|
|
Reply
|
pchoate
|
10/14/2010 4:40:08 AM
|
|
"Sri" <subhadrasri@gmail.com> wrote in message
news:8d23c9f8-e0a4-4fa0-97ab-c113d1032c5d@g18g2000vbn.googlegroups.com...
> Hello All,
>
> Is there any way to compress a SAS dataset without recreating it?
You can't rewrite a dataset without, well, rewriting it. And if you don't
rewrite it, it won't change.
|
|
0
|
|
|
|
Reply
|
Lou
|
10/15/2010 12:47:39 AM
|
|
|
4 Replies
759 Views
(page loaded in 0.074 seconds)
|
|
|
|
|
|
|
|
|