Previous Topic: CALL to Subroutine CLOSES

Next Topic: CALL to Subroutine SHRKHCX


CALL to Subroutine SHRKHCS

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

Assembler Language

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

COBOL

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

PL/I Optimizer

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

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

Parm

Meaning

URA

Uncompressed Record Address (Required)

The address of the uncompressed data to be compressed by the subroutine, excluding any RDW. This storage area (that is, the uncompressed record) is not modified by the SHRKHCS subroutine.

CRA

Compressed Record Address (Required)

The address of a user-supplied main storage area where the SHRKHCS subroutine places the compressed data. The storage area must be large enough to contain the entire compressed record and does not include the RDW.

URL

Uncompressed Record Length (Required)

The address of a halfword or fullword from which SHRKHCS receives the length of the uncompressed record in binary form. Setting the first byte to x '80' specifies the fullword format.

WRK

Hardware Compression Work Area (Required)

The address of a 60-byte work area.

 

Bytes

 

Meaning

 

0–7

HC#STDnn where nn is 01 thru 99 for a CA supplied dictionary, or HC#USRnn where nn is 00 thru 27 for a user defined dictionary.

 

8–11

Address of the selected dictionary load module. Although only the expansion dictionary is used, the compression dictionary must be the first half of the load module. If the desired dictionary is already LOADed, insert its address here before the first call. If the address is zero, the subroutine 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 dictionary address.

 

12–14

ICB. Set this to zero for the first call to permit the subroutine to calculate it for you.

 

15

Dictionary size. Set this to zero for the first call to permit the subroutine to calculate it for you.

 

16–17

Noncompressible length if any, or zero.

 

18–20

Return code from CSRCMPSC macro.

 

24–27

Dynamic area address. Set to zero for first call.

RC

Return Code (Optional)

The address of a binary fullword in which the SHRKHCS subroutine can store a value to indicate whether or not an error occurred in expanding the record. If this optional parameter is coded, certain 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 SHRKHCS processing, register 15 and RC are 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.