COBOL Manual for TNS/E Programs (H06.03+)

Issues Related to Linking
HP COBOL Manual for TNS/E Programs520347-003
24-2
Code and Data Blocks
A compilation unit is a collection of source statements presented to a compiler in one
compilation. It contains one or more separately compiled programs.
For each compilation unit, the compiler produces a single object file. For each
separately compiled program in the compilation unit, the object file contains one
relocatable code block for the outermost source program, one relocatable code block
for each program nested inside the outermost source program, and one or more data
blocks. Each nest of programs produces an indivisible nest of code blocks. In the
object file, the code and data blocks exist solely as named code blocks and data
blocks; they do not have a collective identity.
These compilers also produce one object file per compilation unit:
TNS HP C
TNS HP C++
FORTRAN
Pascal
TAL
Native (TNS/R and TNS/E) HP C
Native (TNS/R and TNS/E) HP C++
pTAL
The object file contains one relocatable code block for each procedure and zero or
more data blocks.
Figure 24-1. Code and Data Blocks
Compiler
Separately compiled program A
Separately compiled program B
Nested program C
Nested program D
Code
Block
B
Code
Block
C
Code
Block
D
Code
Block
A
Data
Block
Data
Block
Data
Block
Data
Block
Data
Block
VST702.vsd