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-15
How Programs Share Resources
How Programs Share Resources
A program can share resources with programs that it contains (directly or indirectly)
and programs that are in the same run unit as it is.
The resources that a program can share with programs that it contains are:
•
record-names
•
data-names
•
condition-names
•
file-names
The program makes them accessible to the inner programs by declaring them to be
global. This enables the inner programs to use the associated data items and file
connectors without declaring them. (The opposite of global is local. Local names are
only accessible to the program that declares them.)
The resources that a program can share with programs in its run unit are:
•
data items
•
file connectors
The program makes them accessible to the other programs by declaring them to be
external. Any other program in the run unit can use them by likewise declaring them to
be external. (The opposite of external is internal. Internal objects are only accessible to
the program that declares them—or, if they have global names, to programs within that
program—and only one program can declare them.)
Topics:
•
Global and Local Names
•
External and Internal Objects
•
Shared Data
•
Shared Files