Re-Entrant VSAM Compression Exit: ZCOMP1

The re-entrant ZCOMP1 exit was designed as an exit users can supply to decrypt coded fields, expand compressed records, and accomplish other specified data manipulations. The ZCOMP1 user exit can access all files readable by the GNTINT Interface and it is the user's responsibility to write and maintain that exit. It works with compressed VSAM and sequential files. It requires an initial call to ZCOMP0 for initial housekeeping and a USERWD parameter to anchor storage.

In this section:

Linking ZCOMP1 in VSAM

What Happens When You Use ZCOMP1 in VSAM

ZCOMP1 Parameter List in VSAM

There are no special Master File requirements. SUFFIX can equal VSAM (for KSDS or ESDS files), FIX (for sequential files), or PRIVATE (for file access through the GETPRV user exit).

Linking ZCOMP1 in VSAM

After you write a ZCOMP1 user exit, you link it with VVSET by using either the GENFSAM EXEC (for VM/ESA), or the GENFSAM JCL (for OS/390) found in the FOCCTL.DATA data set. Note that GENFSAM is designed to link in both ZCOMP1and GETPRV user exits at the same time. If you only implement one of them, the VM EXEC generates the correct linkage to the routine required, whereas in the OS/390 JCL, you must comment out the INCLUDE OBJECT statements in the GENFSAM member. ZCOMP1 can be linked as re-entrant if you plan to use the USERWD parameter.


Top of page

What Happens When You Use ZCOMP1 in VSAM

The GNTINT Interface reads the record for the allocated data source. Upon a successful read, GNTINT calls ZCOMP0, if it exists, with the parameters listed below so that initial housekeeping can be performed. All subsequent calls are to ZCOMP1 with the same parameter list.

The ZCOMP1 exit is responsible for determining what to do with the parameter information it receives. The DDNAME can be used to determine whether the associated data source needs to be decompressed or not. If not, the user exit typically moves A(IRECLEN) to A(ORECLEN) and A(A(IREC)) to A(A(OREC)) and returns to GNTINT with a zero A(STATCODE). If decompression or other processing is required, it is the responsibility of the user exit to do so.

After the user exit completes its processing, it should return with either the A(ORECLEN), A(A(OREC)) and a zero status code or with a non-zero status code which gives the following message:

(FOC1150) ZCOMP DECOMPRESS ERROR: status

Note: This error terminates a TABLE request.


Top of page

ZCOMP1 Parameter List in VSAM

Parameter

Description

Length and Format

A(STATCODE)*

Pointer to fullword binary status code

4-byte integer

A(DDNAME)

Pointer to 8 byte file name in use

8-byte character

A(USERID)

Reserved for future use

8-byte character

A(IRECLEN)

Pointer to length of original record

4-byte integer

A(A(IREC))

Pointer to pointer to original record

4-byte integer

A(ORECLEN)*

Pointer to length of revised record

4-byte integer

A(A(OREC))*

Pointer to pointer to revised record

4-byte integer

A(USERWD)**

Pointer to fullword

4-byte integer

* The user supplies these parameters.

** This parameter can be used to anchor user storage for re-entrant processing.

Note: Never modify the primary pointers - only the pointers or values that they point to.


Information Builders