5. FILES › 5.2 Intermediate Files › 5.2.2 Compressed Format
5.2.2 Compressed Format
The compressed format is produced by the module VMTCMP when
the parameter for compressed data is selected. This is a
variable blocked file. The maximum record length is governed
by the VMTXFR BUFFSIZE parameter.
Record header format:
RDW DS H RDW
DS H RESERVED
COUNT DS F COUNT
Header record extension:
ORG COUNT
DC F'0' COUNT OF ZERO
DC C'MAI' IDENTIFIER
DC C'1' VERSION
DC X'C0FFEE' UNIQUE ID
DS C RECFM: 'F' OR 'V'
DS C RESERVED
DS H LRECL
DS H BUFFER SIZE
Trailer record extension:
ORG COUNT+4
DC C'MAI' IDENTIFIER
DC C'1' VERSION
DC X'DECAFE' UNIQUE ID
DS C RECFM: 'F' OR 'V'
DS C RESERVED
DS H LRECL
DS H BUFFER SIZE
Data segment:
Data segments follow a record header in two types, for
repeating and non-repeating data. Each segment begins with a
one-byte header. The header for a non-repeating data segment
has the form
DC B'cnnnnnnn'
where
c is 0, indicating the following data is not compressed.
nnnnnn
is one less than the count of bytes following the
header that constitute the data in the segment. This
count does not include the header. The number of
bytes following the header is nnnnnn+1.
The header for a repeating data segment has the form
DC B'cnnnnnnn'
where
c is 1, indicating that the following data is
compressed, and
nnnnnn
is the number of times the byte following the header
must be repeated to recreate the original repeating
data. The total number of bytes in the original data
is nnnnnn+2.
For example, the following original data
DC C'******ABCDEF'
produces
DC X'84',C'*' six bytes repeating, and
DC X'05',C'ABCDEF' six bytes non-repeating.
Note: This structure places a limit of 128 bytes of
non-repeating data per segment, and 129 bytes of repeating
data per segment.