SPDSDCMP Macro Variable

Specifies to compress SPD Server tables that are stored on disk.

Valid in: SPD Server
Default: NO
Restrictions: A server table cannot be encrypted if it is compressed.
Assignments for macro variables with character input (for example, YES | NO | BINARY arguments) must be entered in uppercase (capitalized).
Interactions: The corresponding table option is COMPRESS=. If you specify values for both the COMPRESS= table option and the SPDSDCMP macro variable, the SPDSDCMP setting overrides the COMPRESS=setting.
Used in conjunction with the IOBLOCKSIZE= table option.

Syntax

SPDSDCMP=YES | CHAR | BINARY

Required Arguments

YES | CHAR

specifies that the rows in a newly created table are compressed by SAS using run-length encoding (RLE). RLE compresses rows by reducing repeated consecutive characters (including blanks) to 2-byte or 3-byte representations. Use the YES or CHAR argument to enable RLE compression for character data. The YES and CHAR arguments are functionally identical and interchangeable.

BINARY

specifies that the rows in a newly created table are compressed by SAS using Ross Data Compression (RDC). RDC combines run-length encoding and sliding-window compression to compress the file. Use the BINARY argument to compress binary and numeric data. This method is highly effective for compressing medium to large (several hundred bytes or larger) blocks of binary data (numeric variables).

Details

When you set the SPDSDCMP macro variable to YES, the server compresses newly created tables by blocks, according to the algorithm specified. To control the amount of compression, use the table option IOBLOCKSIZE= to specify the number of rows that you want to store in the block. For more information, see IOBLOCKSIZE= Table Option.
Note: Once a compressed table is created, you cannot change its block size. To resize the block, you must issue PROC COPY to copy the table to a new table, setting IOBLOCKSIZE= to the new block size for the output table.

Example

You should conserve disk space before you create a huge table. You can use SPDSDCMP to compress character and numeric data at the beginning of your job.
%let SPDSDCMP=BINARY;  

See Also

Last updated: February 8, 2017