Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Dynamic linking and loading using DBL

The dynamic binder loader DBL links modules temporarily into a loadable unit, which it then loads into memory and executes immediately. The generated load unit is automatically deleted at the end of the program run. The mode of operation of DBL is described in detail in the “Binder-Loader-Starter” manual [10].

DBL is called implicitly by the commands START-PROGRAM and LOAD-PROGRAM. The following overview summarizes the options of the START-PROGRAM and LOAD-PROGRAM commands that are most relevant to calling DBL; a detailed description of all the available operands is provided in the “BS2000/OSD-BC Commands” manual [3].


{START-PROGRAM | LOAD-PROGRAM} FROM-FILE =]
*MODULE (LIBRARY={*OMF,ELEMENT=modul | *OMF [,ELEMENT=*ALL] | bibliothek,ELEMENT=element} [,RUN-MODE = {*STD | *ADVANCED(ALT-LIB=*YES)}])



The START-PROGRAM command instructs DBL to generate an executable program, load it into memory, and start it. Since the program is run immediately after the command, the necessary resources (files) must be assigned to DBL before the START-PROGRAM command is given (see section "Assignment of cataloged files"). 

The LOAD-PROGRAM command instructs DBL to generate an executable program and load it into memory without starting it. This makes it possible to enter additional commands prior to program execution, e.g. commands for program monitoring using a debugging aid. The program can subsequently be started by means of

  • a %RESUME command, if tests are to be performed using the advanced interactive debugger (AID) or

  • a RESUME-PROGRAM command in all other cases.

LIBRARY=*OMF
indicates the temporary EAM file of the current task into which the compiler has output the compiled object module.

ELEMENT=module
is the name of the module that is to be loaded first. The string “module” consists of the first eight characters of the corresponding ID name in the compilation unit. “module” can also be the ENTRY name of the program segment that is to be loaded first.

ELEMENT=*ALL
causes DBL to fetch all the modules from the EAM object module file. If this is what is desired, there is no need to specify it explicitly as this value is preset as the default.

LIBRARY=library
is the name of a PLAM library in which the module is stored as a library element. Using *LINK(LINK-NAME=linkname) it is also possible to specify a predefined file link name for the library.

ELEMENT=element
is the name of the module that is stored as a type-R element in the specified PLAM library. If there is more than one element with the same name in the library, the element with the (alphabetically) highest version designation is used.

RUN-MODE=STD
In this mode, the runtime system CRTE must be assigned as the TASKLIB by using the SET-TASKLIB command before DBL is called.
Apart from the TASKLIB and, if applicable, the library containing the modules, no other libraries can be taken into consideration during link-editing.

RUN-MODE=ADVANCED(ALTERNATE-LIBRARIES=YES)
In this mode, in order to resolve external references DBL searches up to 99 different libraries assigned by means of the link name BLSLIBnn (00 ≤ nn ≤ 99) prior to invocation of DBL.

Dynamic loading

If other external subprograms are invoked by COBOL modules via “CALL identifiers”, some additional conditions for loading and starting must be observed. See chapter "Program linkage" for more details.