COBOL Manual for TNS and TNS/R Programs
Source Program Organization and Format
HP COBOL Manual for TNS and TNS/R Programs—522555-006
2-11
Scope of User-Defined Names
Scope of User-Defined Names
When a program directly or indirectly contains other programs, each program can use
identical user-defined names to name objects independent of the use of these user-
defined names by other programs. If program X describes a data item named B, and
program X includes another program Y, program Y can describe a different data item
named B (or even a file connector named B). The B of program Y is entirely separate
from the B of program X. The two Bs have different scopes.
Table 2-3. Scope of User-Defined Names
Type of User-Defined Name What Can Reference It
Paragraph-name
Section-name
Statements and entries in the program that defines it
Library-name
Text-name
Any COBOL program
Alphabet-name
Class-name
Condition-name
Mnemonic-name
Symbolic character
Statements and entries in either the program that contains
the Configuration Section or programs that it contains
(when the user-defined word is declared in a Configuration
Section)
Program-name
Condition-name
*
Data-name
File-name
Record-name
Index-name
See these topics:
•
Program-Name
•
Condition-Name, Data-Name, File-Name, and Record-
Name
•
Index-Name
* When not declared in the Configuration Section.