Specifying the Segment Edit/Compression exit routine

To specify the use of the Segment Edit/Compression exit routine for a segment, use the COMPRTN= keyword of the SEGM statement in the DBD.

The COMPRTN= parameter on the SEGM statement is used to specify a segment edit/compression routine. The syntax of the COMPRTN= parameter is the following.

Full function fixed length segments:
Read syntax diagramSkip visual syntax diagramCOMPRTN=(routinename,DATA,KEY,INIT,size,PAD
Full function variable length segments:
Read syntax diagramSkip visual syntax diagramCOMPRTN=(routinename,DATA,KEY,INIT

There are five positional sub parameters:

routinename

The first sub parameter that identifies the name of the routine

DATA and KEY

The second sub parameter indicates if all of the segment, including the key, will be compressed or if only the data past the key will be compressed. KEY indicates that the key and all the data will be compressed. KEY cannot be specified for HISAM root segments.

DATA and KEY

The second sub parameter indicates if all of the segment, including the key, will be compressed or if only the data past the key will be compressed. KEY indicates that the key and all the data will be compressed. KEY cannot be specified for HISAM root segments.

INIT

Optional third subparameter. It indicates that the routine will be driven at initialization and termination. This allows the routine to do some special processing, such as loading a table at initialization and deleting it at termination. Your exit routine requirements determine if this parameter must be specified.

size and PAD

The fourth and fifth sub parameters are valid only for fixed length segments. The fourth subparameter has two possible meanings, either an "increment" size or a "PAD" size. The fifth sub parameter determines the meaning of the fourth. If the fifth subparameter is omitted, the fourth sub parameter is an increment size. If PAD is specified for the fifth subparameter, the fourth sub parameter is a PAD size.

A PAD size is used to specify a minimum size that the segment will be when written to DASD. When compression reduces the segment's length to less than the PAD size, IMS pads the segment to the PAD size before writing it to DASD. PAD sizes are never required, but may be recommended for performance reasons.