COBOL Manual for TNS and TNS/R Programs

Language Elements
HP COBOL Manual for TNS and TNS/R Programs522555-006
3-7
COBOL Words
COBOL Words
char-1
char-n
If the COBOL word is a level-number or segment-number, then char-1 is a digit.
If the COBOL word is a section-name or paragraph-name, then these rules apply:
char-1 is a letter (uppercase or lowercase) or a digit.
char-n is a letter (uppercase or lowercase), a digit, or a hyphen (-).
The last character cannot be a hyphen.
The maximum length of the word is 30 characters.
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.
Figure 3-3. COBOL Words in a Source Program
char-1
char-n
ns
ns
VST741.vsd
Reserved
Words
User-Defined
Names
COBOL Words in a Source Program
System-Names
VST505.vsd