Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Examples of exchanging shared objects

Example 1 (Unix and Linux systems)

On a Unix or Linux system, an individual module called INCTAX is to be exchanged dynamically on a particular date. In this case, you must carry out the following steps:

  1. Create and compile the module using the options required for shared objects.

  2. Compile the module with the switches required for shared objects. Transfer the module as a shared object without version under the name INCTAX to the directory containing the user-specific programs. In the example the placeholder so-lib is specified for the directory. This directory could be /usr/proglib, for example.

  3. Generate the module as a shared object with the following KDCDEF statements:

    SHARED-OBJECT INCTAX,DIRECTORY=so-lib,LOAD-MODE=STARTUP

    PROGRAM .... ,SHARED-OBJECT=INCTAX

    The shared object is thus loaded when the application starts (mandatory for shared objects without version).

  4. Link the work process, whereby you must specify the dynamic library with the shared object INCTAX.

  5. Start the application as usual.

  6. Modify the module and save it before the effective date in the file:

    so-lib/INCTAX

  7. Enter the following administration command:

    KDCPROG SHARED-OBJECT=INCTAX

    The shared object will be exchanged in the individual work processes as soon as these processes have processed the current job.

Example 2

On a Unix or Windows system, a shared object called MNTHBALANCE is to be available in 12 versions (BIL01,... BIL12) and is to be exchanged at the end of each month. In each case, it should not be loaded until it is called for the first time. Carry out the following steps:

  1. Create and compile the module using the options required for shared objects (for Windows systems see "Creating application programs as DLLs (Windows systems)").

  2. Compile the module with the switches required for shared objects. In the directory with the user-specific programs (so-lib in the example), create the directory MNTHBALANCE and into this directory copy at least the version required for the first application run.

  3. Generate each version of the shared object with the following KDCDEF statement:

    SHARED-OBJECT MNTHBALANCE

                  ,DIRECTORY=so-lib
                  ,VERSION=BILxx       (xx=01,... ,12)
                  ,LOAD-MODE=ONCALL

    The shared object is not loaded until the program unit is called.

    Enter the following PROGRAM statement for the shared object:

    PROGRAM .... ,SHARED-OBJECT=MNTHBALANCE

  4. In Unix and Linux systems you link the work process with the dynamic library by specifying the dynamic library with the shared objects.
    There are no special cases on Windows systems in this case.

  5. Start the application as usual.

  6. On July 1, for example, enter the following administration command:

    KDCPROG SHARED-OBJECT=MNTHBALANCE,VERSION=BIL07

    Please make sure that this version exists in the directory at the specified time.

    The shared object is not exchanged in the individual work processes until the corresponding program unit is called for the first time.