Previous Topic: CALL to Subroutine CLOSE

Next Topic: CALL to Subroutine EXPANDS


CALL to Subroutine SHRINKS

Each CALL to SHRINKS compresses one record image in main storage. There are five parameters (four required and one optional), which you code in a SHRINKS CALL. The parameters are positional and must be coded in the same sequence as shown in Table 5-4. The following are model statements for calling SHRINKS:

Assembler Language

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

COBOL

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

PL/I Optimizer

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

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

Parm

Meaning

URA

Uncompressed Record Address (Required)

The address of the in-core record to be compressed. The SHRINKS 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 290 bytes larger than the uncompressed record. The SHRINKS 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

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.

 

14–15

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