You can add comments to SCHEMA, SUBSCHEMA, RECORD element substatement, and LOGICAL record definitions in the COMMENTS clause. Rules for coding comment-text appear next.
Text Can Be Any Length
Text can extend to any length. Code as many lines as are necessary to document the entity.
Use Quotes on Each Line
A quote must precede the text of each line; ending quotes on each line are optional. When COMMENTS is the last clause in the statement and the terminating quote (at the end of the last line) is omitted, code the period on a separate line; otherwise, the compiler treats the period as part of the comment.
Multiline Input
When text extends beyond the first line of input, each subsequent line must begin with a character indicating either continuation or concatenation, as follows:
|
Line type |
Symbol |
Meaning |
|---|---|---|
|
Continuation |
Hyphen (-) |
Compilers treat the new line as a continuation of comment text |
|
Concatenation |
Plus (+) |
Compilers append the new line to the preceding line of comment text; any number of text lines can be concatenated, provided that their combined length does not exceed 80 bytes |
Examples
The following example of the SUBSCHEMA statement compares valid omissions of a terminating quote with an invalid omission. In the third statement, the subschema compiler assumes that the period is part of the comment and that ADD RECORD was meant to be a clause of the SUBSCHEMA statement; because this is not valid syntax, the compiler flags ADD RECORD as an error.
modify subschema name is empss01
usage is dml
comments 'This subschema is used only in emergencies
.
modify subschema name is empss02
comments 'This subschema will be obsolete by August.
usage is dml.
modify subschema name is empss03
comments 'This subschema will be obsolete by August.
add record name is employee.
The following example illustrates continuation and concatenation:
add subschema name is empss01
comments 'Includes the entire '
+ 'employee '
+ 'database.'
- 'Ron and Jan '
+ 'are responsible for this subschema.'.
ADD SUBSCHEMA NAME IS EMPSS01
COMMENTS 'INCLUDES THE ENTIRE EMPLOYEE DATABASE.'
- 'RON AND JAN ARE RESPONSIBLE FOR THIS SUBSCHEMA.'.
|
Copyright © 2014 CA.
All rights reserved.
|
|