Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Linking the start LLM

When linking the start LLM, a distinction is made between the following options:

  • Linking the ROOT table module statically in the start LLM, or

  • Loading the ROOT table module dynamically at the start of the application program. In this case, the name of the library containing the ROOT table module must be specified in the start parameters for TABLIB, and the name of the ROOT table module (PLAM element name) must be specified for ROOTNAME (see section "Start parameters for openUTM"). First, the KDCRTMN module must be linked statically.

The second procedure is more beneficial, because you do not need to relink the application if changes are made in the UTM generation. For the same reason, you should if possible save all program units in load modules that are linked dynamically.

Please note the following points for both procedures:

  • The runtime systems for C and SPL, together with the ILCS, are required by the KDCROOT modules, which is why the non-shareable parts of the runtime system must always be linked statically.

  • After linking, the start LLM must only have unresolved external references to runtime system modules which are either loaded as a subsystem before the application start or loaded dynamically at the application start.

  • You should avoid saving more than one start LLM in the same library, because BLS attempts to resolve open external references from this library at the start. I.e. in addition to load modules loaded dynamically, the library must only contain a start LLM loaded with the START-EXECUTABLE-PROGRAM command. You can also deactivate the AUTOLINK function using parameters of START-EXECUTABLE-PROGRAM.

  • The RESOLVE statement to the library SYSLNK.CRTE.PARTIAL-BIND orSYSLNK.CRTE must always be specified as the first RESOLVE statement for a runtime system and then for the UTM library. The library you use in the start LLM to link the necessary modules of the CRTE must also be specified when linking all load modules of the application. The library SYSLNK.CRTE.PARTIAL-BIND offers performance advantages and should therefore be used in preference.

Example

The following BINDER run contains all the statements required to link a start LLM. It is assumed that the application is running with the shared runtime environment CRTE and was installed using IMON.

The string vvv stands for the openUTM version (e.g 070 for V7.0).

/START-BINDER
//START-LLM-CREATION INTERNAL-NAME=start-llm                          -
//                  ,INTERNAL-VERSION=start-llm-version 
//REMARK  +-----------------------------------------------------------+
//BEGIN-SUB-LLM-STATEMENTS SUB-LLM-NAME=ROOT-TAB-LLM ---------------------- 1
//INCLUDE-MODULES LIBRARY=tablib ,ELEMENT=root-module 
//END-SUB-LLM-STATEMENTS
//REMARK  +-----------------------------------------------------------+
//INC-MOD ELEM=KDCRTMN ,LIB=<userid1>.SYSLNK.UTM.vvv ---------------------- 2
//REMARK  +-----------------------------------------------------------+
//BEGIN-SUB-LLM-STATEMENTS SUB-LLM-NAME=LM-SHARED-RTS --------------------- 3
//INCLUDE-MODULES LIBRARY=$userid2.SYSLNK.CRTE.PARTIAL-BIND, ELEMENT=ITCMADPT
//INCLUDE-MODULES oncall-load-module 
//INCLUDE-MODULES startup-load-module 
//INCLUDE-MODULES pool-load-module 
//END-SUB-LLM-STATEMENTS
//REMARK  +-----------------------------------------------------------+
//RESOLVE-BY-AUTOLINK LIBRARY=$userid1.SYSLNK.UTM.vvv --------------------- 4
//RESOLVE-BY-AUTOLINK LIBRARY=user-lib 
//REMARK  +-----------------------------------------------------------+
//RESOLVE-BY-AUTOLINK LIBRARY=$userid2.SYSLNK.CRTE.PARTIAL-BIND ----------- 5
//RESOLVE-BY-AUTOLINK LIBRARY=other-rts-lib 
//RESOLVE-BY-AUTOLINK LIBRARY=$userid1.SYSLNK.UTM.vvv.SPLRTS
//REMARK  +-----------------------------------------------------------+
//SHOW-MAP ..., UNRESOLVED-LIST=SORTED, ... ------------------------------- 6
//REMARK  +-----------------------------------------------------------+
//REMOVE-MODULES NAME=*ALL,PATH-NAME=.ROOT-TAB-LLM ------------------------ 7
//REMOVE-MODULES NAME=*ALL,PATH-NAME=.LM-SHARED-RTS ----------------------- 8
//REMARK  +-----------------------------------------------------------+
//SET-EXTERN-RESOLUTION SYMBOL-TYP=REFERENCES,RESOLUTION=STD
//SAVE-LLM LIBRARY=start-library,ELEMENT=*INTERNAL-NAME(           -
//                                  VERSION=*INTERNAL-VERSION)     -
//                ,FOR-BS2000-VERSIONs=*FROM-OSD-V4(...)
//END
  1. First of all, the ROOT table module is always linked in a separate sub-LLM. This module can be removed before saving the start LLM (see 7) if the ROOT table module, as in this example, is not linked statically but is to be loaded dynamically at the start of the application program.

    Using the external references of the ROOT table module, the static program units from user-lib are linked (see 4). However, these should be as few as possible because these modules cannot be exchanged.

  2. Next, the KDCRTMN ROOT system module is linked. This must only be linked explicitly if a start LLM is to be created without a ROOT table module.

  3. In this case, an adapter module (ITCMADPT) is linked into your own sub-LLM. This ensures that the necessary runtime modules are dynamically loaded.

    In addition, all existing load modules loaded dynamically are linked in this sub-LLM, so that the necessary runtime system modules are linked to the start LLM by the RESOLVE-BY-AUTOLINK statement. This means that they are already available in the dynamic loading process and need not be loaded dynamically with the autolink function, as this reduces the load performance.

    If you use the COBOL subsystem, the adapter module (ITCMADPT) can be omitted from the SUB-LLM mentioned above.

  4. You must always specify the UTM library as the first library in a RESOLVE-BY-AUTOLINK statement. This can then be followed by RESOLVE-BY-AUTOLINK statements to user libraries.

  5. You must always specify the CRTE library as the first library of a runtime system in a RESOLVE-BY-AUTOLINK statement. After the CRTE library, you should enter the RESOLVEs to any libraries of other runtime systems, before the library with the SPL runtime system required by openUTM. Further information can be found in the manual for the corresponding runtime system.

  6. You can use the SHOW-MAP statement to list the unresolved external references, for example. The list, which is created at this point in the BINDER run, contains all open external references that are yet to be resolved. At the end of the BINDER run, you automatically receive another list of the unresolved external references, though this also contains all unresolved external references arising from the removal of the sub-LLM.

  7. With a REMOVE-MODULES statement you remove the ROOT table module from the start LLM.

  8. The adapter module (ITCMADPT) that has been linked in (if necessary) and the shareable modules of the runtime system for COBOL and the load modules generated with ONCALL, STARTUP or POOL are also removed from the start LLM.

     

The start LLM linked in this way must be loaded with the following command:

/START-EXECUTABLE-PROGRAM FROM-FILE=*LIBRARY-ELEMENT   -
                    (LIBRARY=start-library             -
                    ,ELEMENT-OR-SYMBOL=start-llm)      -
           ,DBL-PARAMETERS=*PARAMETERS(                -
           ,LOADING=*PARAMETERS(                       -
                    PROGRAM-MODE = *ANY                -
                    ,LOAD-INFORMATION = *REFERENCES))  -
           ,ERROR-PROCESSING=*PARAMETERS(              -
                    UNRESOLVED-EXTRNS=*DELAY           -
                    ,ERROR-EXIT = *NONE)