Data Definition Language (DDL) Reference Manual — 426798-002
5 -1
5
Definitions and Records
Definitions and records are DDL dictionary objects that describe data structures and
disk-file record structures, respectively.
A definition (or DEF) consists of the name, data type, size, and other attributes of a
field (elementary item) or of a named group of fields in a data structure.
A record consists of the record structure of an Enscribe disk file. Usually, a record also
includes file creation information so that FUP can create a file from the record
structure. If the file is to be key sequenced, a record also contains its key attributes.
This section describes the statements that define fields, groups of fields, and records.
DEFINITION and RECORD Statements
The DEFINITION and RECORD statements, described in this section, define DDL
definitions and records. The statements must conform to the rules of form described in
Section 2, DDL Language Elements
.
These statements are usually specified in a source-schema file that is used as the IN
file when DDL is executed noninteractively.
DEFINITION Statement
The DEFINITION statement defines a definition that the DDL compiler can add to the
currently open DDL dictionary. Having been entered in the dictionary, the definition can
then be included in any later DEFINITION or RECORD statement by reference.
If a DEFINITION statement names a definition that is already in the open dictionary
and no other object refers to the definition, DDL replaces the existing definition with the
new definition. If another object refers to the existing definition, DDL issues an error
message and does not add the new definition to the dictionary.
If a previous compiler command opened any language source-code files, DDL
translates the definition into the specified language and writes it to the open source-
code files.
Forms of the DEFINITION Statement
The DEFINITION statement has three forms:
Field
This form defines a single field. A field DEFINITION statement consists of a field
name; its data type and size (PICTURE or TYPE); and, optionally, attributes such
as DISPLAY, HEADING, HELP, or MUST BE.
Group