Previous Topic: CALL to Subroutine SHRINK

Next Topic: CALL to Subroutine CLOSE


CALL to Subroutine EXPAND

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

Assembler Language

CALL EXPAND,(URA,CRA,URL,FDT,[,RC]),VL

COBOL

CALL 'EXPAND' USING URA CRA URL FDT [RC].

PL/I Optimizer

CALL EXPAND(URA CRA URL FDT [RC]);

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

Parm

Meaning

URA

Uncompressed Record Address (Required)

The address of the main storage area where the EXPAND subroutine places the uncompressed record image which it constructs. If the record was a variable-length record before compression, URA should be the address of the RDW of the expanded record image. 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 record image 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 EXPAND subroutine.

URL

Uncompressed Record Length (Required)

The address of a halfword or fullword from which EXPAND receives the length of the compressed record in binary form and into which the subroutine returns the length of the expanded record in binary form. The subroutine does not always require the compressed length, but you should always provide it. Setting the first byte to x '80' specifies the fullword format. If the record was a variable-length non-VSAM record before compression, URL may be identical to the URA parameter.

FDT

File Descriptor Table Identifier (Required)

The address of a binary fullword which contains the file number, a value between zero and 31, if the FDT is in sequential data set format. If the FDT is in load module format, the File Descriptor Table Identifier is the address of the SCB associated with this file.

RC

Return Code (Optional)

The address of a binary fullword in which the EXPAND 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 EXPAND processing, register 15 and RC are set to zero.