Previous Topic: SEQUENCE FIELD statementNext Topic: LOGICAL PARENT FIELD statement


FIELD statement

This format of the FIELD statement defines the named record's search fields (that is, the search fields other than the sequence fields).

There must be a separate statement to define each search field in each record that corresponds to a segment with search fields.

For a record corresponding to a logical child segment, this format defines the search fields for the logical child segment and for the virtual logical child segment.

DL/I fields whose names begin with /CK or /SX are treated like any other search fields and are defined with this format of the FIELD statement.

Syntax

►►─┬────────────────────────────────┬────────────────────────────────────────►
   └─ FIELD name is dl1-field-name ─┘

 ►─┬──────────────────────────────────────────┬──────────────────────────────►
   └─ STARTING POSition is starting-position ─┘

 ►─┬──────────────────────────────┬──────────────────────────────────────────►◄
   └─ LENgth is dl1-field-length ─┘

Parameters

FIELD name is dl1-field-name

Names the DL/I field being defined. Use the NAME clause entry in the DL/I FIELD statement that defines the search field for the segment corresponding to the named record.

Ensure that dl1-field-name is identical to the field name by which the DL/I application will refer to the field.

STARTING POSition is starting-position

Specifies the position in the record in which the search field begins. Use the START parameter value in the DL/I FIELD statement that defines the search field. Omit this field if the name field is a /SX field.

LENgth is dl1-field-length

Specifies the length of the search field. Use the BYTES parameter value in the DL/I FIELD statement that defines the search field.