In the course of compilation, COBOL2000 generates object modules or link-and-load modules (LLMs), which are then available in a PLAM library or in the temporary EAM file of the current task.
The program cannot, however, run in this form because its machine code is not yet complete: each module contains references to external addresses, i.e. to other modules, which must supplement it when execution takes place. The compiler generates these external references during compilation for one or more of the following reasons:
The COBOL program contains statements which
require complex routines at machine code level (e.g. SEARCH ALL, INSPECT) or
constitute interfaces to other software products or the operating system (e.g. SORT or input/output statements such as READ, WRITE).
This applies to all COBOL programs, because the routines for program initialization and program termination are also in this category. The machine instruction sequences for these statements are not generated during compilation; they are already available as finished modules in a library, the runtime system. An external reference to the corresponding module in the runtime system is entered into the module generated by the compiler for each such COBOL statement.
The COBOL program calls an external subprogram.
The CALL statements in the “CALL literal” format cause the compiler to generate external references for the linkage run at the appropriate locations in the generated module.
CALL statements in the “CALL identifier” format cause the dynamic binder loader to dynamically load the appropriate modules at runtime (see chapter "COBOL2000 and POSIX").The COBOL program has been compiled with
COMOPT GENERATE-SHARED-CODE=YES (in SDF: SHAREABLE-CODE=YES).The compiler generates a non-shareable data module and a shareable code module (see section "Shareable COBOL programs"). The data module contains an external reference to the associated code module.The COBOL program uses language elements for object orientation.The compiler generates external references for all non-parameterized classes /interfaces which are specified in the REPOSITORY paragraph.
The COBOL program contains data written with external. The compiler creates common areas for this purpose.
During linking and loading, the use of some language elements in programs requires additional modules which are not part of the runtime system(CRTE), but must be available in the system. These must either be linked statically (see section "Static linkage using TSOSLNK" and section "Linking using BINDER") or assigned using appropriate BLSLIBnn link names during dynamic linkage (see section "Dynamic linking and loading using DBL"). Specifically, this concerns:
SORT:
SORT80 module with ILSORT and SORTZM1 entries (among others).
This module is normally contained in the $TASKLIB library.Library member as line sequential file:
LMSUP1 module.
This module is normally contained in the $LMSLIB library.National data (UTF-16):
GNLADPT module.
Where you can find this module is described in the “XHCS (BS2000/OSD)” manual [33].XML:
GNLADPT module.
See the “XHCS (BS2000/OSD)” manual [33].ITCRXFCA module in the ’parser library’, which you must provide.
See chapter "Processing XML documents".