Compressing a file is
a process that reduces the number of bytes required to represent each
observation. Advantages of compressing a file include reduced storage
requirements for the file and fewer I/O operations necessary to read
or write to the data during processing. However, more CPU resources
are required to read a compressed file (because of the overhead of
uncompressing each observation), and there are situations when the
resulting file size might increase rather than decrease.
Use the COMPRESS= system
option to compress all output data sets that are created during a
SAS session. Use the option only when you are creating SAS data files
(member type DATA). You cannot compress SAS views, because they contain
no data.
Once a file is compressed,
the setting is a permanent attribute of the file, which means that
to change the setting, you must re-create the file. That is, to uncompress
a file, specify COMPRESS=NO for a DATA step that copies the compressed
file.
Note: For the COPY procedure, the
default value CLONE uses the compression attribute from the input
data set for the output data set. If the engine for the input data
set does not support the compression attribute, then PROC COPY uses
the current value of the COMPRESS= system option.
For more
information about CLONE and NOCLONE, see the COPY Statement options, DATASETS Procedure in Base SAS Procedures Guide. This interaction does not apply when using
SAS/SHARE or
SAS/CONNECT.