Previous Topic: CALL to Subroutine SHRKHCC

Next Topic: CALL to Subroutine EXPANDZ


CALL to Subroutine SHRINKZ

Each CALL to SHRINKZ compresses one record image in main storage. There are five parameters (four required and one optional) that the user codes in a SHRINKZ CALL. The parameters are positional and must be coded in the same sequence as shown in the following table. The following are model statements for calling SHRINKZ:

Assembler Language

CALL SHRINKZ,(URA,CRA,URL,WRK[,RC]),VL

COBOL

CALL 'SHRINKZ' USING URA CRA URL WRK [RC].

PL/I Optimizer

CALL SHRINKZ(URA CRA URL WRK [RC]);

The following table describes the parameters available to the SHRINKZ Subroutine:

Parm

Meaning

URA

Uncompressed Record Address (Required)

The address of the in-core record to be compressed. The SHRINKZ subroutine does not alter this area. If the record is variable length, URA is the address of the actual data, not the RDW.

CRA

Compressed Record Address (Required)

The address of a user-supplied main storage area at least 8 bytes larger than the uncompressed record. The SHRINKZ subroutine places the compressed data in this area.

URL

Uncompressed Record Length (Required)

The address of a halfword or fullword in which the user supplies the length of the uncompressed record in binary form. The fullword format is specified by setting the first byte to x'80' and supports data up to 24 megabytes in length.

WRK

Super Express Work Area (Required)

The address of a 40-byte work area. The first 2 bytes must be the length of the noncompressible area in binary format. If there is no noncompressible area, this value must be zero. The next 2 bytes are set to the compressed data length (excluding RDW) if the length is <32K, or -1 if the length is >32K. The length is also returned in register 0 in all cases. Add 4 to this length to build an RDW if required.

RC

Return Code (Optional)

The address of a binary fullword in which the SHRINKZ subroutine can store a value to indicate whether an error occurred in compressing the record. If this optional parameter is coded, certain ABEND conditions are suppressed, and a return code value is stored in the binary fullword addressed by RC and in register 15. If no error occurs during processing by the SHRINKZ subroutine, register 15 is zero upon return to the user's program, and RC is set to zero. If the data does not compress, the return code is -1, and the uncompressed data is copied to the compressed data location.