Format Definition

A format definition is made up of one or more field definitions. A field definition describes a particular field within a record and the type or format of the data in that field. A format definition can be specified in various print commands to cause DUMPALL to process only the specified fields from each record and to specify how DUMPALL is to print each field. If you specify more than one field in a format, when DUMPALL prints data, DUMPALL separates the display for each field from that of the preceding field by 2 blank characters.

Syntax

── FORMAT ─┬────────────────────────────┬──────────────────────────────►
           └─ ' ──<mnemonic>── ' ── := ─┘
  ┌◄────────────┬──────┬────────────┐
  │             └◄─ , ─┘            │
►─┴─┬─ ' ──<format mnemonic>── ' ─┬─┴──────────────────────────────────┤
    ├─ ' ──<field mnemonic>── ' ──┤
    └─<field definition>──────────┘

Explanation

'<mnemonic>':=

Defines the subsequent format and gives it the specified name. You can use the mnemonic in subsequent commands to represent its associated format definition. A mnemonic can be any valid identifier from 1 to 63 characters in length.

'<format mnemonic>'

'<field mnemonic>'

Specify a format or field that you have previously defined by using the mnemonic option of the format definition or field definition.

Note: Mnemonic identifiers used in the format definition are case-sensitive, i.e. ABC is distinct from abc.

<field definition>

Describes a field within a record and its format. Refer to “Field Definition” earlier in this section for an explanation of <field definition>.

Example 1

Example 1 defines a format by using two field definitions. The first field describes the first 6 bytes of the record in EBCDIC format. (EBCDIC is the default format when the field length is specified in bytes.) The second field describes word 7 of the record in decimal format.

FORMAT [BYTE 0 FOR 6] [WORD 7 DECIMAL]

Example 2

Example 2 defines a format named FMT1, which is entered into the defines file. FMT1 consists of two fields. The first field is named FLD1 and is entered into the defines file. FLD1 describes bytes 20 through 24 of the record in EBCDIC format. The second field is not named. This field describes byte 50 of the record in EBCDIC format. (EBCDIC is the default format when the field length is specified in bytes.)

FORMAT 'FMT1':=['FLD1':=BYTE 20 FOR 5] [BYTE 50]

Example 3

Example 3 defines a format named FMT2, which is entered into the defines file. FMT2 consists of the previously defined field FLD1 and the previously defined format FMT1.

FORMAT 'FMT2':='FLD1' 'FMT1'