DECOMPRESS Function Output

#### Search Results

Search

# DECOMPRESS Function Output

The ADACMP DECOMPRESS function decompresses each record and then stores the record in a sequential data set. The records are output in variable-length, blocked format. Each decompressed record is output either with or without the ISN option according to the format shown below:

    length xx [ISN] data

where

length | is a two-byte binary length of the data, + 8 (or +4 if the ISN parameter is not specified).
xx | is a two-byte field containing binary zeros.
ISN | is a four-byte binary ISN of the record.
data | is a decompressed data record.

The fields of the data record are provided in the order in which they appeared in the FDT when the file was unloaded. The standard length and format are in effect for each field.

If a field value exceeds the standard length, the value will be truncated to the standard length if the field is alphanumeric and the TRUNCATE parameter was specified; otherwise, ADACMP writes the record to the DD/FEHL error data set (read the next document, Rejected Data Records).

Any count bytes for multiple-value fields or periodic groups contained in the record are included in the decompressed data output. ADACMP generates a count of 1 if the MU field or PE group is empty. This makes it possible to use the output of the DECOMPRESS operation as the input to a subsequent COMPRESS operation.

## Rejected Data Records

ADACMP rejects a record whenever a compressed field's size is greater than the default length held in the FDT, unless the TRUNCATE parameter is specified.

Any records rejected during ADACMP decompression are written to the DD/FEHL error data set. The records are output in variable blocked format and may be segmented into multiple physical records. Each logical rejected record will be preceded by an initial ADAF rejected record header. If the logical record and the ADAF header do not fit in the DD/FEHL physical record length, ADAN rejected record headers will precede the remaining physical rejected record segments that comprise the logical rejected record.

The functions of these two different headers are as follows:

- ADAF headers indicate the error condition and pertinent information.

- ADAN headers are smaller and are used for rejected record continuation and ADAH/ADAC header error reporting.

DSECTs for the ADAF and ADAN headers can be found in members ADAF and ADAN of the distributed Adabas SRCE data set.

Traditionally, the DD/FEHL error data set produced for ADACMP errors has truncated rejected records that exceeded the FEHL physical record length. In Version 8, the rejected records are segmented instead of truncated. Because of this change, the DD/FEHL LRECL setting must be at least 500 bytes.

The following response codes may occur:

X'E7'(231 - ADARSP231) | Input record too short (DECOMPRESS)
X'E8'(232 - ADARSP232) | Output record length error (DECOMPRESS). If the output records exceed the LRECL size, use HEADER=YES to segment the output records.

Notes:

1. Only the first incorrect field within a record is detected and referenced in DD/FEHL. Other errors within the record are not detected or recorded.

### Example of Rejected Data Records

The following table depicts the FEHL output for two rejected records during ADACMP decompression. Rejected record 1 has only one FEHL record (ADAF); rejected record 2 is segmented into two FEHL records (ADAF and ADAN):

Note
DSECTs for the ADAF and ADAN headers can be found in members ADAF and ADAN of the distributed Adabas SRCE data set.

Rejected Record | DDFEHL Records | DDFEHL Fields | Description
--- | --- | --- | ---
Field | Value
1 | ADAF | ADAFEYE | ADAF | ADAF header eye-catcher
ADAFLEN | 72 | ADAF header length
ADAFTYPE | R | Type. Valid values are: H: ADAH header P: ADAH header and payload R: Logical record
ADAFIND | E | Continuation indicator. Valid values are: C: Continuation record to follow E: End of logical record (last segment)
Reserved | 0 | Reserved
ADAFSLEN | 22000 | Segment length
ADAFTOTL | 22000 | Total length
ADAFISN | 1 | ISN of record
ADAFLNUM | 1 | Logical record number
ADAFPNUM | 1 | Physical record number
ADAFEOFF | 5000 | Error offset in logical record
ADAFPEX | 0 | PE index
ADAFFN | ZA | Field name
ADAFRSP | 41 | Response code
ADAFSUB | 2 | Subcode
Reserved | 0 | Reserved
ADAFDATA | 'Record 1 -- Payload Data' | Rejected input data
2 | ADAF | ADAFEYE | ADAF | ADAF header eye-catcher
ADAFLEN | 72 | ADAF header length
ADAFTYPE | R | Type. Valid values are: H: ADAH header P: ADAH header and payload R: Logical record
ADAFIND | C | Continuation indicator. Valid values are: C: Continuation record (ADAN) to follow E: End of logical record (last segment)
Reserved | 0 | Reserved
ADAFSLEN | 27962 | Segment length
ADAFTOTL | 50000 | Total length
ADAFISN | 2 | ISN of record
ADAFLNUM | 2 | Logical record number
ADAFPNUM | 3 | Physical record number
ADAFEOFF | 35000 | Error offset in logical record
ADAFPEX | 0 | PE index
ADAFFN | ZA | Field name
ADAFRSP | 41 | Response code
ADAFSUB | 2 | Subcode
Reserved | 0 | Reserved
ADAFDATA | 'Record 2 -- Payload data part 1' | Rejected input data
ADAN | ADANEYE | ADAN | ADAN header eye-catcher
ADANLEN | 24 | ADAN header length
ADANTYPE | R | Type. Valid values are: C: ADAC header D: ADAC header and payload P: ADAH record segment R: Logical record segment
ADANIND | E | Continuation indicator. Valid values are: C: Continuation record (ADAN) to follow E: End of logical record (last segment)
Reserved | 0 | Reserved
ADANSLEN | 22038 | Segment length. Note The sum of the values of ADANSLEN and ADAFSLEN should equal the value of ADAFTOTL (in this example, 22038 +27962=50000)
ADANOFF | 27962 | Error offset in logical record.
ADANDATA | 'Record 2 -- Payload data part 2' | Continued rejected input data