O'Reilly logo

SAS 9.4 Language Reference, 6th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The CONTENTS procedure and the DATASETS procedure produce the following error
when the .sas7bxat (extended attributes) file is absent from the directory and extended
attributes were defined:
ERROR: File libref.dsname_EXT.EXTATTR does not exist.
Compressing Data Files
Definition of Compression
Compressing a file is a process that reduces the number of bytes required to represent
each observation. In a compressed file, each observation is a variable-length record,
while in an uncompressed file, each observation is a fixed-length record.
Advantages of compressing a file include the following:
reduced storage requirements for the file
less I/O operations necessary to read from or write to the data during processing
There are disadvantages to compressing a file. For example:
More CPU resources are required to read a compressed file because of the overhead
of uncompressing each observation.
There are situations when the resulting file size can increase rather than decrease.
Requesting Compression
By default, a SAS data file is not compressed. To compress, you can use these options:
COMPRESS= system option to compress all data files that are created during a SAS
session
COMPRESS= option in the LIBNAME statement to compress all data files for a
particular SAS library
COMPRESS= data set option to compress an individual data file
To compress a data file, you can specify one of the following:
COMPRESS=CHAR to use the RLE (Run Length Encoding) compression algorithm
COMPRESS=BINARY to use the RDC (Ross Data Compression) algorithm
When you create a compressed data file, SAS writes a note to the log indicating the
percentage of reduction that is obtained by compressing the file. SAS obtains the
compression percentage by comparing the size of the compressed file with the size of an
uncompressed file of the same page size and record count.
After a file is compressed, the setting is a permanent attribute of the file. This means that
you must re-create the file to change the setting. That is, to uncompress a file, specify
COMPRESS=NO for a DATA step that copies the compressed data file.
For more information about the COMPRESS= data set option, see SAS Data Set
Options: Reference. For more information about the COMPRESS= option in the
Compressing Data Files 661

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required