COBOL Manual for TNS and TNS/R Programs

Source Program Organization and Format
HP COBOL Manual for TNS and TNS/R Programs522555-006
2-24
Shared Files
Shared Files
Two programs in a run unit can refer to common file connectors in these
circumstances:
Any program that has described an external file connector can refer to that file
connector.
If program G is contained within program H, both programs can refer to a common
file connector. They do so by referring to an associated global file-name (or
associated global record-name, in the case of the WRITE and REWRITE
statements) described in either:
°
The containing program H
°
Any program that directly or indirectly contains H
If several programs define a file connector as external (causing its storage location to
be a single location outside all programs) and they also define the file connector as
having a global name, then all such programs and all programs nested within each of
them have access to the file connector.