User Exit 6 (User Processing Before Data Compression)

This user exit can be used to perform user processing on a record before it is processed by the ADACMP COMPRESS utility. It can also be used to control the sequence and contents of the decompressed records that are output from the ADACMP DECOMPRESS utility; when used in this way, the user exit controls which decompressed records ADACMP writes to the DDAUSBA data set.

Sample user exit 6 assembler language source is supplied in the Adabas source library in member USEREX6A (Assembler). A sample job to assemble and link the user exit is supplied in member ASMUEX6 of the Adabas sample job library.

Warning:
Sample user exits and programs and are not supported under any maintenance contract agreement.

The ADACMP utility job must specify ADARUN UEX6=program parameter, where program is the name of the user program and parameter is a parameter passed to that program.

User exit 6 is called by the ADACMP COMPRESS utility function immediately after one of the following occurs so that it can append records to the input:

  • A record has been read from DDEBAND.

  • An end-of-file condition has occurred on DDEBAND.

graphics/adacmp_flow.png

graphics/adacmp_parms.png

ADACMP User Processing User Exit (6) Parameters

This document covers the following topics:


ADACMP Header Processing

When ADACMP is run with the parameter HEADER=YES, all input records for ADACMP COMPRESS and output records for ADACMP DECOMPRESS are preceded by 32-byte ADAH and ADAC headers that describe the grouping of physical records into logical records that may be larger than 32 KB. DSECTs for the ADAH and ADAC headers can be found in members ADAH and ADAC in the distributed Adabas 8 SRCE library. These headers identify how one logical record containing uncompressed data is composed of one or more physical records.

When ADACMP is run with user exit 6 and HEADER=YES, ADACMP will pass each physical record to user exit 6. The user exit application may need to use these headers to determine the relationship between the physical and logical records.

For more information about the ADACMP headers and record segmenting, read Segmented Record Considerations.

Input Parameters

Parameter Usage
0 (R1) Address of an input record. The length field preceding the variable record is skipped. The address is of a fullword containing -1 (X`FFFF FFFF') if the user exit is called after ADACMP detects end-of-file in DDEBAND.
4 (R1) Address of the field containing the input record length. For fixed records, this is a logical record length. For variable records, this is the length of the actual data only (excluding the length field itself). The address points to a fullword containing minus 1 (X`FFFFFFFF') if the user exit is called after ADACMP detects end-of-file in DDEBAND.
8 (R1) Contains binary zeros on entry to the user exit (see Output Parameters ).
12 (R1) Contains binary zeros on entry to the user exit (see Output Parameters ).
16 (R1) Address of the FILE parameter value specified by the ADACMP COMPRESS utility job. The address is in the rightmost/low-order two bytes. The location and content of this fullword must remain unchanged during the time of the user exit. If ADACMP COMPRESS did not specify the FILE parameter, the fullword is X`00000000'.

Output Parameters

Parameter Usage
8 (R1) Address of the user exit output record. This record will be used as input to the ADACMP compression algorithm. The address of this record must be placed into 8 (R1) each time the user exit is called. If this field contains binary zeros on return, ADACMP will ignore the input record and will continue processing.
12 (R1) Address of a 4-byte field containing the length of the returned record. The address of this field must be placed into 12 (R1) each time the exit is called. If this field contains binary zeros on return, ADACMP will ignore the record and will continue processing. Though the length field pointed to by 12 (R1) has a length of 4 bytes, only the low-order/rightmost halfword is used (bytes 3 and 4). If byte 2 contains a X`01' on return, the exit is recalled before the next record is read from DDEBAND. This enables the user to return more than one record to ADACMP for each record read from DDEBAND.