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

&pagelevel(4)&pagelevel
  1. C or COBOL program (object module)

    /SET-TASKLIB $.SYSLNK.CRTE ------------------------------------------- (1) 
    ...
    /START-PROGRAM *MODULE(LIB=..., ELEM=..., PROG-MODE=ANY) ------------- (2)
    

    (1)

    The library $.SYSLNK.CRTE is assigned as Tasklib.

    (2)

    If the specified start module is a prelinked module then this module must be linked with open external references to the CRTE, i.e. without a RESOLVE statement for the CRTE (see section “The Dynamic Binder Loader (DBL)”).

  2. C or COBOL program (object module or link-and load module)

    /ADD-FILE-LINK LINK-NAME=BLSLIB00,FILE-NAME=userlibrary ------------ (1)
    /ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME=$.SYSLNK.CRTE
    ...
    /START-PROGRAM *MODULE(LIB=..., ELEM=..., PROG-MODE=ANY, ----------- (2)
    /RUN-MODE=ADVANCED(ALT-LIB=YES,AUTO=ALT-LIB))
    

    (1)

    The link names BLSLIB00 and BLSLIB01 are assigned to the libraries userlibrary and $.SYSLNK.CRTE respectively. This means that userlibrary is searched before SYSLNK.CRTE during the resolution of unresolved references. The link names must be assigned before the linkage editor run and are not released after the linkage editor has executed.

    (2)

    If the specified start module is a prelinked module then this module must be linked with open external references to the CRTE, i.e. without a RESOLVE statement for the CRTE (see section “The Dynamic Binder Loader (DBL)”).

  3. C++ program (link-and-load module) for compiler versions <= V2.2

    /ADD-FILE-LINK LINK-NAME=BLSLIB00,FILE-NAME=userlibrary
    /ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME=$.SYSLNK.CRTE
    /ADD-FILE-LINK LINK-NAME=BLSLIB02,FILE-NAME=$.SYSLNK.CRTE.CPP ------ (1)
    ...
    /START-PROGRAM *MODULE(LIB=..., ELEM=..., PROG-MODE=ANY,-  --------- (2)
    /RUN-MODE=ADVANCED(ALT-LIB=YES,AUTO=ALT-LIB))
    

    (1)

    Taking example 2 as our starting point, the link name BLSLIB02 is additionally assigned to the Cfront-C++ library $.SYSLNK.CRTE.CPP (see section “Cfront-C++-library functions and runtime system” ). This means that the program can also use the C++ library functions for complex math and standard I/O. Please note that in the case of C++ programs which use a C++ version <= V2.2, the link names must be assigned in the specified order.During the resolution of unresolved external references, the sequence in which the individual libraries are searched corresponds to the order of their link names BLSLIB00 -> BLSLIB01 -> BLSLIB02.

    (2)

    If the specified start module is a prelinked module then this module must be linked with open external references to the CRTE, i.e. without a RESOLVE statement for the CRTE (see section “The Dynamic Binder Loader (DBL)”).

  4. C++ program, Cfront mode (link-and-load module) for compiler versions as of V3.0

    /ADD-FILE-LINK LINK-NAME=BLSLIB00,FILE-NAME=userlibrary
    /ADD-FILE-LINK LINK-NAME=BLSLIB01,FILE-NAME=$.SYSLNK.CRTE.RTSCPP 
    /ADD-FILE-LINK LINK-NAME=BLSLIB02,FILE-NAME=$.SYSLNK.CRTE.CFCPP ---- (1)
    /ADD-FILE-LINK LINK-NAME=BLSLIB03,FILE-NAME=$.SYSLNK.CRTE 
    ...
    /START-PROGRAM *MODULE(LIB=..., ELEM=..., PROG-MODE=ANY,------------ (2)
     RUN-MODE=ADVANCED(ALT-LIB=YES,AUTO=ALT-LIB))
    

    (1)

    Taking example 2 as our starting point, a link name is additionally assigned to the library SYSLNK.CRTE.CFCPP (Cfront runtime system, see see section “Cfront-C++-library functions and runtime system” ). In the case of C++ programs as of C++ version V3.0, the sequence in which the link names BLSLIBnn are assigned is no longer mandatory.During the resolution of unresolved external references, the sequence in which the individual libraries are searched corresponds to the order of their link names BLSLIB00 -> BLSLIB01 -> BLSLIB02.

    (2)

    If the specified start module is a prelinked module then this module must be linked with open external references to the CRTE, i.e. without a RESOLVE statement for the CRTE (see section “The Dynamic Binder Loader (DBL)”).