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 LLMs to public/private slices

If you use the linkage editor to link shareable modules in OM format to LLMs with a public slice, you must ensure that the CSECTs of these modules have the attribute PUBLIC. If this is not the case, the linkage editor creates these CSECTs in the private slice.

This can occur for example with AREAs that were previously in shareable modules in OM format (the attribute has no significance here) or with all shareable COBOL objects. You can adapt the objects by

  • adding and then recompiling the PUBLIC attribute for AREAs,

  • recompiling the associated sources in LLM format for shareable COBOL objects, or

  • setting the PUBLIC attribute with the linkage editor.

The following example illustrates the third option.

Example

A load module is to be statically linked as an LLM. It should comprise

  • the COBOL objects AFPUT and COBECHO with the non-shareable partsAFPUT and COBECHO and the shareable parts AFPUT@ and COBECHO@

  • as well as the shareable AREAs AREA1, AREA2 and AREA3, all of which are missing the PUBLIC attribute.

     

This results in the following binder statements:

//START-LLM-CREATION                                                   -
//INTERNAL-NAME  = EXAMPLE-LLM                                         -
//              ,INTERNAL-VERSION    = 001                             -
//              ,SLICE-DEFINITION    = BY-ATTR( PUBLIC = YES )
//REMARK ---------------------------------------------------------------
//REMARK ---------------------------------------------------------------
//INCLUDE-MOD  LIB = LIB.UTM.PRELINK                                   -
//          ,ELE = COBECHO
//INCLUDE-MOD  LIB = LIB.UTM.PRELINK                                   -
//          ,ELE = AFPUT
//REMARK ---------------------------------------------------------------
//REMARK ---------------------------------------------------------------
//BEGIN-SUB-LLM SUB-LLM-NAME=OM-WITHOUT-PUBLIC-ATTRIBUTE
//INCLUDE-MOD  LIB = LIB.UTM.PRELINK                                   -
//          ,ELE = AFPUT@
//INCLUDE-MOD  LIB = LIB.UTM.PRELINK                                   -
//          ,ELE = COBECHO@
//INCLUDE-MOD  LIB = LIB.UTM.PRELINK                                   -
//          ,ELE = AREA1
//INCLUDE-MOD  LIB = LIB.UTM.PRELINK                                   -
//          ,ELE = AREA2
//INCLUDE-MOD  LIB = LIB.UTM.PRELINK                                   -
//          ,ELE = AREA3
//MODIFY-SYMBOL-ATTR   PUBLIC = YES
//END-SUB-LLM
//REMARK ---------------------------------------------------------------
//REMARK ---------------------------------------------------------------
//SET-EXTERN-RESOLUTION  SYMBOL-TYPE=REFERENCE , RESOLUTION=STD
//MODIFY-MAP-DEFAULT  PROGRAM-MAP = PAR( DEFINITION = ALL              -
//                                   ,INVERT         = ALL             -
//                                   ,REFERENC       = ALL)            -
//                               ,UNRESOLVED     = YES                 -
//                               ,SORTED-PRO     = YES                 -
//                               ,DUPLICATE      = YES                 -
//                               ,OUTPUT= LIST.LINK.EXAMPLE-LLM
/REMARK ----------------------------------------------------------------
//SAVE-LLM   LIB = LIB.LOAD-MODULE.STARTUP                             -
//              ,ELEM                = *INTERNAL                       -
//              ,FOR-BS2000-VERSION  = *FROM-OSD-V4(...)
//REMARK ---------------------------------------------------------------
//END


As the example shows, it is sufficient to link all shareable modules that do not have the PUBLIC attribute in a sub-LLM in the linkage editor run and then set the PUBLIC attribute for the entire sub-LLM using the MODIFY-SYMBOL-ATTRIBUTES statement. In the list LIST.LINK.EXAMPLE-LLM - section *PROGRAM MAP* - you can then see which slice contains the individual objects.