To create a compressed SAS data set, we use the COMPRESS=YES option as an output DATA set option or in an OPTIONS statement. Compressing a data set reduces its size by reducing repeated consecutive characters or numbers to 2-byte or 3-byte representations.
To uncompress observations, we must use a DATA step to copy the data set and use the option COMPRESS=NO for the new data set.
The advantages of using a SAS compressed data set are that there would be reduced storage requirements for the data set and only fewer input/output operations would be necessary to read from and write to the data set during processing.
The disadvantages include not being able to use the SAS observation number to access an observation. The CPU time required to prepare compressed observations for input/output observations is increased because of the overhead of compressing and expanding the observations. We have to remember that if there are a few repeated characters, a data set can occupy more space in the compressed form than in the uncompressed form, due to the higher overhead per observation. For more details on SAS compression see SAS Language: Reference, Version 6, First Edition, Cary, NC: SAS Institute Inc., 1990.