COBOL Manual for TNS and TNS/R Programs
Language Elements
HP COBOL Manual for TNS and TNS/R Programs—522555-006
3-10
COBOL Words
User-Defined Names
A user-defined name is a COBOL word that you compose for your own use. You
cannot use a reserved word for a user-defined name. You can compose words for
these types of items:
In general, each user-defined name in each category must identify a unique entity
within the source program. Exceptions:
•
Level-numbers and segment-numbers have no uniqueness constraints.
•
Using an all-digit word as a section-name or paragraph-name does not interfere
with its concurrent use as a level-number or a segment-number.
•
The same paragraph-name can identify two or more paragraphs if each paragraph
appears in a different section of the Procedure Division.
•
Using a word as a library-name does not interfere with its concurrent use as the
name of an entity in another category (this is an HP extension to COBOL, which
does not permit a library-name to duplicate the name of another entity); however,
library-names must be unique among themselves.
•
Using a word as a text-name does not interfere with its concurrent use as the
name of an entity in another category. The same text-name can identify two or
more library texts if each text appears in a different library.
•
The category data-reference includes record-names, data-names, and condition-
names. The same user-defined name can identify two or more entities in any
combination of these subcategories; however, a program cannot reference the
entities identified by a duplicated name unless the contexts of their definitions
permit sufficient qualification to construct a unique reference to each of them (see
Qualified Names).
System-Names
Although COBOL does not define any specific system-names, it includes several
syntactic definitions that require them. COBOL limits the forms of system-names to
those permitted for user-defined names. HP COBOL relaxes this restriction. The use of
each particular system-name is limited to contexts appropriate for its category. The few
minor restrictions on duplicate usages of system-names are discussed in SPECIAL-
NAMES Paragraph.
In HP COBOL, system-names are either resource names or file names in the form
used by the operating system.
alphabet-name index-name paragraph-name segment-number
class-name level-number program-name symbolic-character
data-reference library-name routine-name text-name
file-name mnemonic-name section-name