Previous Topic: CALL to Subroutine SHRINKS

Next Topic: CALL to Subroutine CLOSES


CALL to Subroutine EXPANDS

Each call to EXPANDS 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 EXPANDS CALL. The parameters are positional and must be coded in the same sequence as they appear in below. The following are model statements for calling EXPANDS:

Assembler Language

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

COBOL

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

PL/I Optimizer

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

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

Parm

Meaning

URA

Uncompressed Record Address (Required)

The address of the main storage area where the EXPANDS subroutine places the uncompressed data which it constructs, excluding any RDW. 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 EXPANDS subroutine.

URL

Uncompressed Record Length (Required)

The address of a halfword or fullword from which EXPANDS 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.

WRK

Standard Tables Work Area (Required)

The address of a 64-byte work area.

 

Bytes

 

Meaning

 

0–7

STDTBL01 through STDTBL06 as appropriate.

 

8–11

Address of the selected Standard Table. If the desired Standard Table is already link edited or LOADed, insert its address here before the first call. If the address is zero, routine will load it and fill in its address for you. An invalid nonzero value will cause an abend or other unpredictable results, so you must set it either to zero or to the valid table address.

 

12–13

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 EXPANDS 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 EXPANDS 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.