COBOL Manual for TNS/E Programs (H06.03+)

Language Elements
HP COBOL Manual for TNS/E Programs520347-003
3-7
COBOL Words
If the COBOL word is not a level-number, segment-number, section-name, or
paragraph-name, these rules apply:
char-1 is a letter (uppercase or lowercase) or a digit.
If char-1 is the only character in the word, then it must be a letter.
char-n is a letter (uppercase or lowercase), a digit, or a hyphen (-).
At least one character must be either a letter or a hyphen.
The last character cannot be a hyphen.
The maximum length of the word is 30 characters.
The same COBOL word can be used as a system-name and as a user-defined name
within a source program. The class of a specific occurrence of the word is determined
by context.
With the exception described in the preceding paragraph, every name that you
reference in a COBOL program must be unique, either because no other name has the
same spelling (including hyphenation), or because the name is part of a hierarchy of
names (such as a data-name defined within a record). In the latter case, you can
qualify the name with one or more of the higher-level names. You must specify enough
higher-level names to make the name unique, but you need not specify all levels. The
most significant name in a hierarchy must have unique spelling, because you cannot
qualify it.
Topics:
Reserved Words
User-Defined Names
System-Names
Qualified Names
Figure 3-3. COBOL Words in a Source Program
Reserved
Words
User-Defined
Names
COBOL Words in a Source Program
System-Names
VST505.vsd