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

Example 149 Calling Programs That Are in a Separate File
PROGRAM-ID. CALLER.
...
SPECIAL-NAMES.
FILE "$MYVOL.MYSUB.COBJECT" IS C-ARCHIVE.
...
CALL "CPGM1" IN C-ARCHIVE
...
CALL "CPGM2" IN C-ARCHIVE
Compilation Details
Processes Involved in Compilation
The ECOBOL compiler consists of a driver process, ECOBOL, and a sequence of subordinate
processes.
For a successful compilation, the ECOBOL compiler driver calls ECOBFE, using temporary files to
pass information between them. If you specify the RUNNABLE or SEARCH directive when creating
a loadfile (CALL-SHARED) or a DLL library (SHARED), the ECOBOL compiler also calls the eld
utility.
The symbol table information in the object file can be used later by the symbolic debuggers.
Figure 24 ECOBOL Compilation of Single Program Unit
Temporary File Placement
The ECOBOL compilers and their supporting processes create and use temporary files.
By default, the compiler creates its temporary files on the current default volume. If called by the
compiler, the process ECOBFE and the linker create their temporary files on the current default
volume.
The PARAM SWAPVOL command specifies the volume on which the compiler and its processes
will create temporary files (if possible). It does not determine where the operating system creates
the compiler’s own swap file. For details, see PARAM SWAPVOL.
The RUN option SWAP specifies one volume for both the temporary files that the compiler and its
processes will create and for the compiler’s own swap file. For more information on SWAP and
other RUN options, see the TACL Reference Manual.
CALL and ENTER Statement Processing: Overview
Any TNS/E HP COBOL program can call TNS/E HP COBOL programs with CALL statements. Any
HP COBOL program can call non-COBOL programs with ENTER statements. An HP COBOL program
that compiled with the PORT directive can also call non-COBOL programs with X/Open CALL
statements.
516 Program Compilation