Definitions and Records
Data Definition Language (DDL) Reference Manual — 426798-002
5- 24
Key Assignment Syntax
•
Every field description must have a PICTURE or TYPE clause. A group description
cannot have a PICTURE clause.
•
A TYPE clause for a field within a record structure can refer to a field or group
definition previously stored in a data dictionary. When a field is defined by referring
to a group definition, it effectively becomes a group.
•
The size of a record structure is the total of the lengths of its member fields, plus
any FILLER fields generated by DDL.
•
Level numbers must conform to the following rules of form:
°
A RECORD statement has no level number; it is implicitly at the 01 level.
°
A group of level n includes all following groups and fields with level numbers
greater than n up to the next group or field of level n or less.
°
Level numbers need not be assigned sequentially; that is, an 02 group can
contain two 05 fields with no intervening 03 or 04 levels.
°
If a field is defined by a TYPE clause that refers to a group definition, the field’s
level number replaces the implicit level 01 number of the referenced definition,
and the level numbers of the definition’s member fields are adjusted
accordingly.
°
If a field is defined by a TYPE clause that refers to a previous definition, the
level number of any element following the field must be less than or equal to
the level number of the field.
•
Maximum record length depends on the file type. For Format 1 files:
For Format 2 files:
The length of a record is limited further by the following languages:
°
255 bytes for FORTRAN
°
5000 bytes for TACL
°
32766 bytes for Pascal
File Type
Maximum Length
Unstructured 4,096
bytes
Entry-sequenced
4,072 bytes
Relative
4,072 bytes
Key-sequenced
4,062 bytes
File Type
Maximum Length
Unstructured
4,096 bytes
Entry-sequenced
4,048 bytes
Relative
4,048 bytes
Key-sequenced
4,040 bytes