We utilise the COMPRESS=YES option as an output DATA set option or in an OPTIONS statement to generate a compressed SAS data set. By reducing repeated consecutive letters or integers to 2-byte or 3-byte representations, compression decreases the size of a data collection.
We must use a DATA step to replicate the data set and use the option COMPRESS=NO for the new data set to uncompress observations.
The benefits of employing an SAS compressed data set include lower storage needs and fewer input/output operations to read from and write to the data set during processing.
The inability to retrieve an observation using the SAS observation number is one of the drawbacks. Because of the overhead of compressing and expanding the observations, the CPU time required to prepare compressed observations for input/output observations is increased. We must keep in mind that if a data set contains a few repeated letters, the compressed version might take up more space than the uncompressed version due to the increased cost per observation. SAS Language: Reference, Version 6, First Edition, Cary, NC: SAS Institute Inc., 1990. For additional information about SAS compression, see SAS Language: Reference, Version 6, First Edition, Cary, NC: SAS Institute Inc., 1990.