This document describes the input data requirements of the ADACMP utility.
ADACMP input data must be in a sequential data set or file. Indexed sequential and VSAM input cannot be used.
The records may be fixed, variable, or of undefined length. The maximum input record length permitted depends on the operating system. The maximum compressed record length is restricted by the Data Storage block size in use and the maximum compressed record length set for the file (see the MAXRECL parameter of the ADALOD utility). The input records can be in either blocked or unblocked format.
The fields in each record must be structured according to the field definition statements provided (or the specified FDT if an existing Adabas FDT is being used). If a user exit routine is used, the structure following user exit processing must agree with the field definitions. Any trailing information contained in an input record for which a corresponding field definition statement is not present is ignored and is not included in the ADACMP output.
Data sets that contain no records are also permitted.
The input data set can be omitted if the parameter NUMREC=0 is supplied.
The number of values in each record's multiple-value field must either be specified in the field definition statement, or the value count must precede the values in each input record. When specified in the field definition statement, the minimum multiple-value count is 1, and the maximum is 65,534 or 191, depending on the setting of the MUPEX and MUPECOUNT parameters of ADACMP COMPRESS. When the minimum count is specified in the input record, zero (0) can be specified to indicate a multiple-value field containing no values.
If the number of values is the same for each record, this number may be specified with the field definition statement for the multiple-value field (in the occurrences specification). In this case, the count byte in the input record must be omitted. If the record definitions are from an existing FDT or if the input data is from an earlier DECOMPRESS operation, the data already contains the length values; the count must not be specified in the field definition statements.
The count you specify may be changed by ADACMP if the NU option is specified for the field. ADACMP suppresses null values, and changes the count field accordingly. This is true whether you specify the value count before each series of values, or in the field definition statement. Refer to the section MU: Multiple-Value Field.
Field Definition:
ADACMP FNDEF='01,MF,5,A,MU,NU'
Each record contains a different number of values for MF, and the count comes before each series of occurrences.
Before ADACMP | After ADACMP | |
---|---|---|
Input Record 1 (3 values) |
MF count=3 AAAA BBBB CCCC |
MF count=3 AAAA BBBB CCCC |
Input Record 2 (2 values) |
MF count=2 AAAA BBBB |
MF count=2 AAAA BBBB |
Input Record 3 (3 values) |
MF count=3 AAAA bbbb CCCC |
MF count=2 AAAA CCCC |
Input Record 4 (no values) |
MF count=0 | MF count=0 |
Input Record 5 (1 value) |
MF count=1 bbbb |
MF count=0 |
Field Definition:
ADACMP FNDEF='01,MF,4,A,MU(3),NU'
Each record contains 3 values for MF, as specified in the field definition statement.
Before ADACMP | After ADACMP | |
---|---|---|
Input Record 1 | MF count=3 AAAA BBBB CCCC |
|
Input Record 2 | MF count=2 AAAA BBBB |
|
Input Record 3 | MF count=2 AAAA CCCC |
|
Input Record 4 | MF count=0 |
Each periodic group must specify a count of field iterations (occurrences) in the record. The count is specified either within the field definition statement for all records, or as a one- or two-byte binary value (depending on the value of the MUPECOUNT parameter) before each occurrence group in every record. If the count is in the field definition statement, the count byte must be omitted from the input records. When specified in the field definition statement, the minimum count allowed is 1, and the maximum is 65,534 or 191, depending on the setting of the MUPEX and MUPECOUNT parameters of ADACMP COMPRESS.. When the minimum count is specified in the record, the value can be zero (0) for a periodic group with no occurrences.
The occurrence count provided may be modified by ADACMP if all the fields contained in the periodic group are defined with the NU option. If all the fields within a given occurrence contain null values and there are no following occurrences that contain non-null values, the occurrence will be suppressed and the periodic group occurrence count will be adjusted accordingly.
Field Definitions:
ADACMP COMPRESS ADACMP FNDEF='01,GA,PE' ADACMP FNDEF='02,A1,4,A,NU' ADACMP FNDEF='02,A2,4,A,NU'
The input records contain a variable number of occurrences for GA (up to 191 occurrences are permitted as the MUPEX parameter is not specified causing the MUPECOUNT parameter to default to "1"). The count of occurrences comes before each occurrence group in the input records.
Before ADACMP | After ADACMP | |
---|---|---|
Input Record 1 | GA count=2 | GA count=2 |
GA (1st occurrence) A1=AAAA A2=BBBB |
||
GA (2nd occurrence) A1=CCCC A2=DDDD |
||
Input Record 2 | GA count=1 | GA count=0 |
GA (1st occurrence) A1=bbbb A2=bbbb |
||
Input Record 3 | GA count=3 | GA count=3 |
GA (1st occurrence) A1=AAAA A2=bbbb |
||
GA (2nd occurrence) A1=BBBB A2=bbbb |
||
GA (3rd occurrence) A1=CCCC A2=bbbb |
||
Input Record 4 | GA count=0 | GA count=0 |
Field Definitions:
ADACMP FNDEF='01,GA,PE(3)' ADACMP FNDEF='02,A1,4,A,NU' ADACMP FNDEF='02,A2,4,A,NU'
All input records contain 3 occurrences for GA, as specified in the field definition statement.
Before ADACMP | After ADACMP | |
---|---|---|
Input Record 1 | GA count=3 | |
GA (1st occurrence) A1=AAAA A2=bbbb |
||
GA (2nd occurrence) A1=BBBB A2=bbbb |
||
GA (3rd occurrence) A1=CCCC A2=bbbb |
||
Input Record 2 | GA count=2 (see note) | |
GA (1st occurrence) A1=bbbb A2=bbbb |
||
GA (2nd occurrence) A1=BBBB A2=bbbb |
||
GA (3rd occurrence) A1=bbbb A2=bbbb |
||
Input Record 3 | All occurrences contain null values |
GA count=0 All occurrences are suppressed |
Note:
The first occurrence is included in the count since occurrences
follow that contain non-null values. The third occurrence is not included in
the count since there are no non-null values in the occurrences that
follow.
In the PE named AW, the field AY should be added:
Old FDT | New FDT |
---|---|
01 AA,8,A,DE,UQ | 01 AA,8,A,DE,UQ |
01 AW,PE | 01 AW,PE |
02 AX,8,U,NU | 02 AX,8,U,NU |
02 AT,8,U,NU | 02 AT,8,U,NU |
01,AZ,3,A,DE,MU,NU | 02 AY,8,U,NU |
01,AZ,3,A,DE,MU,NU |
Note:
All of the currently existing fields in the PE must be
specified.
Determine the maximum occurrence of the PE (for example, a result of 2).
Decompress the file with the format parameter.
Decompress INFILE=xx,FORMAT='AA,AX1-2,AT1-2,AZ'
Compress again:
ADACMP COMPRESS FILE=32
ADACMP FORMAT='AA,AX1-2,AT1-2,AZ'
ADACMP FNDEF='01,AA,8,A,DE,UQ'
ADACMP FNDEF='01,AW,PE(2)'
ADACMP FNDEF='02,AX,8,U,NU'
ADACMP FNDEF='02,AT,8,U,NU'
ADACMP FNDEF='02,AY,8,U,NU'
ADACMP FNDEF='01,AZ,3,A,DE,MU,NU'
Each value of a variable-length field (length parameter not specified in the field definition) must be preceded by a one-byte binary count indicating the value length (including the length byte itself). An LA field specified with variable length (i.e., length 0), must be preceded by a two-byte inclusive length. An LB field specified with variable length must be preceded by a four-byte inclusive length.
Field Definitions:
ADACMP FNDEF='01,AA,5,A,DE' ADACMP FNDEF='01,VF,0,A' ADACMP FNDEF='01,VR,0,A'
Input record: