In most cases, incorporating CA Compress/2 subroutine calls in an application program requires only minor changes. DD statements which omit the DCB subparameters need not be changed, because the data set label supplies the correct values. Attributes explicitly specified on a DD statement or in a DCB macro, COBOL FD or PL/I file definition must be changed to conform to the compressed data set's attributes.
During compression, except by Super Express, the compressed record image may temporarily grow up to 290 bytes longer than the uncompressed record. Consequently, the area supplied for the compressed record must be 290 bytes longer than the uncompressed record. After compression is complete, the compressed record is almost never greater than eight bytes longer than the uncompressed record, even in worst-case situations.
If input records are processed in locate mode, further adjustments are necessary. In Assembler Language, the general register used with the DSECT must be loaded with the address of the uncompressed record image after calling EXPAND, EXPANDS, SHRKHCX, or EXPANDZ in order to make the program consider the uncompressed record to be the record just read. In COBOL, the entire uncompressed record definition should be moved from the FILE SECTION to the WORKING-STORAGE SECTION. It is then a simple matter to insert the proper call to EXPAND or EXPANDZ immediately following the READ (or GET) for the compressed file. Few if any logic changes should be necessary following the subroutine CALL. Calls to SHRINK, SHRINKS, SHRKHCS, and SHRINKZ can be handled in a similar way.
| Copyright © 2012 CA. All rights reserved. |
|