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: |
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).
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.
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.
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.
Note that upon entry to ZCOMP1, the ORECLEN and OREC parameters are NULL. It is the responsibility of the user to fill these in correctly.
While processing the FOCUS FIN command, a call is placed to the ZCOMP2 entry point, which provides the user with the ability to do any other global cleanup required.
The parameters returned by ZCOMP1 are not validated. It is the responsibility of the user routine to ensure that valid addresses and lengths are returned to FOCUS from ZCOMP1.
Unpredictable results occur if incorrect parameters are passed back from the routine.
Information Builders |