DDL Language Elements
Data Definition Language (DDL) Reference Manual — 426798-002
2 -9
DDL Comments
DDL Comments
The DDL compiler supports two kinds of comments:
•
Dictionary comments, which DDL stores in the dictionary and in all open language
source-code files
•
Listing comments, which appear only in the compiler listing
A dictionary comment is indicated by an asterisk in the first column of the source line.
A listing comment is preceded by an exclamation point and ended by another
exclamation point or by the end of the source line. For example:
Dictionary Comments
Dictionary comments describe a field or a group of fields within a data structure. DDL
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 kinds of dictionary comments:
•
User-defined dictionary comments
•
Dictionary comments generated by DDL
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.
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. DDL groups consecutive dictionary
comment lines together as a single comment. For example:
* Employee Number definition
* empnum uniquely identifies employees
* Possible values: 0 - 9999
DEFINITION empnum PIC 9(4).
Here the three dictionary comment lines form a single comment that DDL stores with
the
empnum
dictionary entry.
* CUSTNUM is the primary key
! The CUSTOMER record is on page 8
DEF CUSTNUM !numeric key!PIC9 (4)
Dictionary
Comment
Listing Comment
Listing Comment
VST204.vsd