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 with DBL

&pagelevel(4)&pagelevel

When the dynamic binder loader DBL is used, modules are temporarily linked into a loadable unit, which is then loaded into memory and executed, all in one operation. The generated load unit is automatically deleted after the program run.

The mode of operation of DBL is described in detail in the “Dynamic Binder Loader / Starter” manual [13 (Related publications )].

Since the C/C++ compiler always generates modules only in LLM format, theSTART-EXECUTABLE-PROGRAM always must be used when linking and loading with DBL.

With this command, object modules and LLMs can be processed. Alternative libraries to be searched (runtime libraries and possibly other libraries) are assigned with the link name BLSLIBnn (00 ≤ nn ≤ 99). This is done with the ADD-FILE-LINK command before the linkage editor is called. For example:

/ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME=PLAM.USER
/ADD-FILE-LINK LINK-NAME=BLSLIB02,FILE-NAME=$.SYSLNK.CRTE

To ensure that DBL searches these alternative libraries, the following entry must be made in the RESOLUTION parameter of the START-EXECUTABLE-PROGRAM command:

..ALTERNATE-LIBRARIES=*BLSLIB##

The linkage run with DBL is initiated by means of the START-EXECUTABLE-PROGRAM or LOAD-EXECUTABLE-PROGRAM command.
If the START-EXECUTABLE-PROGRAM command is used, the program is executed immediately. With the LOAD-EXECUTABLE-PROGRAM command, however, you have the option of entering additional commands (e.g. debugging commands).

 /{START-EXECUTABLE-PROGRAM / LOAD-EXECUTABLE-PROGRAM}
        FROM-FILE=*LIBRARY-ELEMENT(LIBRARY=bibliothek,ELEMENT-OR-SYMBOL=mainmod),
        DBL-PARAMETERS=*PARAMETERS(RESOLUTION=*PARAMETERS(ALTERNATE-LIBRARIES=*BLSLIB##))

LIB=library,ELEM=mainmod

DBL accesses the specified PLAM library. The name of the module containing the main function must be specified as the element name.

RESOLUTION=*PARAMETERS (ALTERNATE-LIBRARIES=*BLSLIB##)

This entry is always required when LLMs are to be linked dynamically.

Load and start function of DBL

Any LLM that has been fully linked with BINDER (i.e. with all external references resolved) can be loaded and started with DBL without assigning alternative libraries as follows:

START-EXECUTABLE-PROGRAM FROM-FILE=*LIBRARY-ELEMENT(*LIBRARY=library,

ELEMENT-OR-SYMBOL=module)

Recommended BLSLIBnn order for assigning CRTE libraries

  1. C programs

    /ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME=user-library

    /ADD-FILE-LINK LINK-NAME=BLSLIB02,FILE-NAME=$.SYSLNK.CRTE

  2. Cfront C++ programs

    /ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME=user-library
    /ADD-FILE-LINK LINK-NAME=BLSLIB02,FILE-NAME=$.SYSLNK.CRTE.CFCPP

    /ADD-FILE-LINK LINK-NAME=BLSLIB03,FILE-NAME=$.SYSLNK.CRTE.CPP

    /ADD-FILE-LINK LINK-NAME=BLSLIB04,FILE-NAME=$.SYSLNK.CRTE

  3. C++ V3 programs (using the Tools.h++ library)

    /ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME=user-library

    /ADD-FILE-LINK LINK-NAME=BLSLIB02,FILE-NAME=$.SYSLNK.CRTE.TOOLS

    /ADD-FILE-LINK LINK-NAME=BLSLIB03,FILE-NAME=$.SYSLNK.CRTE.STDCPP

    /ADD-FILE-LINK LINK-NAME=BLSLIB04,FILE-NAME=$.SYSLNK.CRTE.RTSCPP

    /ADD-FILE-LINK LINK-NAME=BLSLIB05,FILE-NAME=$.SYSLNK.CRTE

  4. C++ 2017 or C++ 2020 programs with library version 1

    /ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME= user-library
    /ADD-FILE-LINK LINK-NAME=BLSLIB02,FILE-NAME=$.SYSLNK.CRTE.CXX01
    /ADD-FILE-LINK LINK-NAME=BLSLIB03,FILE-NAME=$.SYSLNK.CRTE

  5. C++ 2017 or C++ 2020 programs with library version 2

    /ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME= user-library
    /ADD-FILE-LINK LINK-NAME=BLSLIB02,FILE-NAME=$.SYSLNK.CRTE.CXX02
    /ADD-FILE-LINK LINK-NAME=BLSLIB03,FILE-NAME=$.SYSLNK.CRTE

Achtung!

Templates are not instantiated when linking and loading C++ V3, C++ 2017 or C++ 2020 programs with the DBL. All instances must be pre-instantiated using the statement BIND ACTION=*PRELINK.