Modifying a DBD

The database definition must point to the correct compression exit routine to use.

About this task

IMS runs compression or expansion by calling the compression exit routine that is specified in the COMPRTN keyword of the DBDGEN SEGM statement. You must create or modify the existing DBD to specify the compression exit routine.

Procedure

  1. Add or change the COMPRTN keyword of the SEGM statement for each segment that contains compressed data. The COMPRTN keyword must specify either KEY or DATA compression, and must specify INIT. For more information, see COMPRTN keyword.
    The following example shows how to enter the COMPRTN keyword of the SEGM statement for fixed-length segments:Start of change
    SEGM  NAME=SEGMENTA,PARENT=0,BYTES=256,PTR=TB,             
          COMPRTN=(DRVRSCNM,DATA,INIT) 
    End of change

    The following example shows how to enter the COMPRTN keyword of the SEGM statement for variable-length segments:

    SEGM  NAME=SEGMENTA,PARENT=0,BYTES=(256,16),PTR=TB,       
          COMPRTN=(DRVRSCNM,DATA,INIT) 
  2. Start of changeModify the COMPRTN or the BYTES parameter to allow for 10 byte control information.

    If the format or contents of the data in a segment precludes compression, the HDCE exit routine adds control information that indicates that the segment cannot be compressed.

    The control information might lengthen the segment beyond the maximum length definition. For example, an application on a test IMS system uses a production compression exit. If the test application tries to insert an X'00' string segment and no X'00' data was present when the production dictionary was built, that input string cannot be compressed.

    Failure to increase the MAXBYTES field by 10 might result in an ABENDU0853. Follow these instructions to allow for 10 byte control information:

    Segment type Action
    Fixed-length segment Omit the PAD parameter, and omit the max parameter or specify 10 (default) for the max parameter of the COMPRTN keyword of the SEGM statement. If you want to use the PAD parameter to control segment padding, see step 3.
    Variable-length segment Increase the max bytes parameter of the BYTES keyword of the SEGM statement by 10 from the maximum length before compression.
    DEDB If your database is a DEDB, make sure that the new MAXBYTES field is at least 120 bytes less than the VSAM control interval (CI) size. If not, you must redefine your VSAM CI size.
    Segments that cannot be compressed due to data inconsistency If a segment cannot be compressed due to data inconsistency, IMS manages the increased length internally with no affect to the application or DBD. For more information, see the topic "Database Manager exit routines" in IMS Exit Routines.
    End of change
  3. Optional: Start of changeIf you want to control segment padding, adjust the parameters.
    If the compressed segment is frequently replaced by applications, consider adjusting the padding length. When a segment is replaced and the new data length after compression becomes longer, it could cause data fragmentation, which affects database performance. By specifying appropriate padding, IMS adds padding space to the value for the segments that are heavily compressed and reduces fragmentation.
    Segment type Action
    Fixed-length segment Specify the padding length with the max parameter and the PAD parameter of the COMPRTN keyword of the SEGM statement. The max parameter, when specified with the PAD parameter, is treated as the padding length. In this case, the default length, which is 10 bytes, is added for control information.
    SEGM NAME=SEGMENTA,PARENT=0,BYTES=256,PTR=TB,
         COMPRTN=(DRVRSCNM,DATA,INIT,150,PAD)

    Padding length and the PAD parameter are not supported for DEDBs.

    Variable-length segment Specify the padding length with the min bytes parameter of the BYTES keyword of the SEGM statement.
    SEGM NAME=SEGMENTA,PARENT=0,BYTES=(266,150),PTR=TB,
         COMPRTN=(DRVRSCNM,DATA,INIT)
    

    To determine the padding value for each segment, review the Segment Distribution by Compressed Length report (HCO007). For details, see Segment Distribution by Compressed Length report (HCO007).

    End of change
  4. Run an ACBGEN for online databases.
    Running ACBGEN is required whenever you modify a DBD.