Entry header information

When a Save (SAV) command or the Restore (RST) command is run, the output can be directed to a stream file or user area. The content of the output is divided into entries. Each entry in the output has an associated header. This header contains data that specifies the length of the entry and the type of the entry. Each type of entry has its own format. This header information allows the content of the output to be divided into entries that have specific formats. This enables the data in the output to be parsed.

No count of the entries is kept, instead, the end of an entry is determined by entry length. An entry may contain variable length elements. This may result in the entry being padded.

The number of entries in the output is variable. Entries will appear one after the other until a trailer entry is reached. The trailer entry is the last entry in the output.

For each field in the header, an offset is specified in bytes. This offset is relative to the base address of the header, or the beginning of the first field in the header.

The table below shows the format for the header information as it is output by the SAV or RST commands.

Table 1. Entry header information output–SAV and RST commands
Offset (bytes) Type (in bytes) Set by1 Field
Decimal Hex
0 0 BINARY(4) S/R Entry type
4 4 BINARY(4) S/R Entry length
Note:        
1.

Set by column. The following column values indicate which operations write the content of the field into the output:

    Value Condition
    S Save operation set this field.
    R Restore operation set this field.
    S/R Either operation set this field.
    (blank) Not set by either operation. The associated field is set to zero for numeric fields, blank for character fields, or empty for variable-length character fields.