Data Definition Language (DDL) Reference Manual
DDL Language Elements
Data Definition Language (DDL) Reference Manual—529431-004
2-13
Dictionary Comments
In Example 2-4 on page 2-13:
•
The first comment begins with the exclamation point (!) and ends when the line
ends; that is, the entire line is a comment.
•
The second comment begins with the first exclamation point and ends with the
second exclamation point; that is, the second comment is “!numeric key!”.
Dictionary Comments
Dictionary comments describe a field or a group of fields within a data structure. The
DDL compiler stores any dictionary comments associated with a data structure in the
dictionary with that structure if the dictionary is open and if a COMMENTS command is
specified.
DDL has two types of dictionary comments:
•
User-Defined Dictionary Comments on page 2-13
•
Dictionary Comments Generated by the DDL Compiler on page 2-14
Regardless of how they originate, all dictionary comments begin with an asterisk in the
first character position of an input line and continue for the remainder of the line (as in
Example 2-3 on page 2-12). Following the asterisk, a comment can consist of any
ASCII characters.
User-Defined Dictionary Comments
You can precede any CONSTANT, DEFINITION, RECORD, TOKEN-CODE, TOKEN-
MAP, or TOKEN-TYPE statement with a comment. The DDL compiler groups
consecutive dictionary comment lines together as a single comment.
In Example 2-5 on page 2-13, the three dictionary comment lines form a single
comment that the DDL compiler stores with the empnum dictionary entry.
A user-defined dictionary comment can precede a field or group description within a
DEFINITION or RECORD statement, as in Example 2-6
on page 2-14.
Example 2-4. DDL Compiler Listing Comments
! The CUSTOMER record is on page 8
DEF custnum !numeric key! PIC 9(4).
Example 2-5. User-Defined Dictionary Comments
* Employee Number definition
* empnum uniquely identifies employees
* Possible values: 0 - 9999
DEFINITION empnum PIC 9(4).