Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Using shared code

Many compilers offer the option of creating a shareable part when compiling programs. This shareable part need not necessarily be saved in a separate object module, rather can be contained with the non-shareable part in an LLM, which is subdivided into a public and a private slice.

The following objects can be loaded as shareable:

  • shareable modules of program units

  • formats

  • some of the modules for formatting (if shareable)

  • shareable data areas

  • the database connection module, if this is shareable

  • the message modules

  • modules of the runtime systems of the programming languages that are shareable (see the manuals of the individual programming languages)

If parts of a program unit are to be shareable, this must be taken into account in the programming. The compiler which compiles the program unit determines what you must note when programming. For further information, see the openUTM manual „Programming Applications with KDCS” or the appropriate language supplement.

COBOL compiler refers either to COBOL85 or to COBOL2000.

COBOL program units compiled with the COBOL85 compiler are shareable if you set the option COMOPT GEN-SHARE-CODE=YES when compiling. Specifying the option
COMOPT GEN-LLM=YES instructs the compiler to save the objects in an LLM with slices.

COBOL program units compiled using the COBOL2000 compiler are shareableif you specify the following options during compilation:

COMPILER-ACTION=*MOD-GEN(SHAREABLE-CODE=*YES, MODULE-FORMAT=*LLM,...)

C/C++ program units are shareable if you specify the following option when compiling:

COMPILER-ACTION=MODULE-GENERATION( SHAREABLE-CODE=YES,...)

Please refer to the relevant user guides for the corresponding option in other programming languages.

In addition, many runtime systems of the programming languages are shipped with a shareable part.

if you wish to exchange a program unit that is made up of a non-shareable module and a shareable module, then you must link the shareable and non-shareable parts to an LLM because otherwise inconsistencies would arise in the exchange. You can avoid consistency problems by locking the TACs contained in the program unit before the exchange, and then release them again after the shareable and non-shareable parts have been exchanged.

Loading shared code

The shareable program components need only be loaded once together for all tasks of the application(s). Only the non-shareable parts need then be loaded in the local task memory.

You have various options for loading shareable objects:

  • as a nonprivileged subsystem in the class 3/4/5 or 6 memory in the system storage

  • in a common memory pool managed by openUTM in the user storage area(class 6 memory)

See also the “BS2000/OSD Subsystem Management (DSSM/SSCM)” manual.