Version 8.2.5
 —  User, Hyperdescriptor, Collation Descriptor, and SMF Exits  —

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.

The user exit program can be written in Assembler language or COBOL. Sample user exit 6 source is supplied in the Adabas source library, in members USEREX6A (Assembler) and USEREX6C (COBOL). A sample job to assemble and link the user exit is supplied in member ASMUEX6 of the Adabas sample job library. In BS2000 environments, you can use the sample exit assembly job, ASMUEX, to assemble and link all user exits.

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:

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.

Top of page

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 DD/EBAND.
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 DD/EBAND.
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'.

Top of page

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 DD/EBAND.

Top of page