COBOL Manual for TNS/E Programs (H06.03+)
Issues Related to Linking
HP COBOL Manual for TNS/E Programs—520347-003
24-8
Linking HP COBOL Programs
Linking HP COBOL Programs
An HP COBOL program can be linked automatically, as part of compilation: If you
specify the RUNNABLE or SEARCH directive, the ECOBOL compiler also calls the
eld utility. If you do not link the program automatically, you must use the eld utility to
link it after compilation.
Topics:
•
Linking Automatically
•
Linking Programs to Be Called Dynamically
Linking Automatically
If you specify the RUNNABLE directive, the compiler automatically links the program,
interacting with the eld utility.
For simplicity, this explanation attributes actions of internal processes and the eld
utility to the compiler.
Unless all the external routines that your program calls are in the file ECOBEXT,
ZCOBDLL, or ZCREDLL, you must tell the compiler which object files contain the
external routines that your program calls. There are several ways to tell the compiler
about a specific object file:
•
Establish a mnemonic name for the object file and use it in CALL or ENTER
statements.
•
Put the object file’s name on the primary search list.
If the compiler finds an external routine in an object file on the primary search list, it
validates the routine’s parameters and includes the entire object file in your
program’s object file.
•
Put the object file’s name on the tertiary search list.
If the compiler finds an external routine in an object file on the tertiary search list, it
validates the routine’s actual parameters but does not include the routine in your
program’s object file. The system loader resolves the routine at fixup.
You can use a predefined DEFINE, =_OBJECT_SEARCH, to specify one or more
subvolumes for the compiler to search for unqualified object files (see Specifying
Subvolumes to Be Searched for Unqualified Files).
Topics:
•
Establishing a Mnemonic Name for an Object File
•
Putting an Object File on the Primary Search List
•
Putting an Object File on the Tertiary Search List










