Previous Topic: CALL to Subroutine SHRINKZ

Next Topic: Incorporating  Subroutine Calls in Existing Application Programs


CALL to Subroutine EXPANDZ

Each call to EXPANDZ returns one compressed record image in main storage to its original uncompressed form. There are five parameters (four required and one optional) that the user codes in an EXPANDZ CALL. The parameters are positional; they must be coded in the same sequence as they appear in the following table. The following are model statements for calling EXPANDZ:

Assembler Language

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

COBOL

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

PL/I Optimizer

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

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

Parm

Meaning

URA

Uncompressed Record Address (Required)

The address of the main storage area where the EXPANDZ subroutine places the uncompressed data which it constructs. The storage area provided by the user must be large enough to contain the entire expanded record.

CRA

Compressed Record Address (Required)

The address of the compressed data to be expanded by the subroutine. CRA must be the address of the data portion of the record, not the RDW. This storage area, that is, the compressed record, is not modified by the EXPANDZ subroutine.

URL

Uncompressed Record Length (Required)

The address of a halfword or fullword from which EXPANDZ receives the length of the compressed record in binary form and into which it returns the length of the expanded record in binary form. Setting the first byte to x '80' specifies the fullword format. The subroutine uses the compressed record length to make sure the compressed record ends where expected. If it does not, a check byte mismatch condition is forced.

WRK

Super Express Work Area (Required)

The address of a 40-byte work area. The first 2 bytes must be the noncompressible area in binary format. If there is no noncompressible area, this value must be zero.

RC

Return Code (Optional)

The address of a binary fullword in which the EXPANDZ subroutine can store a value to indicate whether or not an error occurred in expanding the record. If this optional parameter is coded, ABEND 10 (check byte mismatch) and certain other user abends are suppressed. Instead, the corresponding completion code is stored in the binary fullword addressed by the RC parameter and in register 15. If no error occurs during EXPANDZ processing, register 15 and RC are set to zero. If the compressed data is not compressed, RC and register 15 are set to -1. You can consider the compressed data to be the uncompressed data.