Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Indirect linkage

The new mechanism, which is referred to as “indirect linkage” below, was introduced in DBL. The term “indirect linkage” means that an external reference is not resolved directly with a program definition in the usual manner, but by an intermediate indirect linkage routine. This IL routine includes a call to a server module containing the required program definition.

Indirect linkage has the following advantages:

  • When a server module is swapped, only the link between the IL routine and the server needs to be removed. A new server module can then be used for the same program definition simply by resolving the external reference between the IL routine and the server module. This eliminates the additional overhead for measures to ensure consistency between the server and its possible callers.

  • The resolution of external references occurs only once and does not change so long as the caller is loaded. This eliminates unlinking across multiple contexts or tasks as well as the need to resolve external references repeatedly whenever the server is called.

Symbols of type ILE

A new symbol type ILE (Indirect Linkage Entry) with the attributes below was added for indirect linkage:

  • Name:
    corresponds to the name of the ILE server

  • Address of the IL routine

  • Address of the ILE server:
    a field containing the ILE server address

  • Offset of the server address in the IL routine:
    locates the field with the ILE server address within the IL routine

  • Status of the server (active or inactive):
    indicates whether the ILE server can be currently called.
    The status can be used both by the calling program and by any user-defined IL routine.

  • Control (by the system or the user)

The declaration of ILEs and the maintenance of ILE lists are performed by means of the ILEMIT and ILEMGT macros. Information on ILEs can be obtained by calling the VSVI1 macro.

The figure 3 illustrates how external references are resolved when the ILE server is loaded.

Figure 3: Indirect linkage

(1)

The call to S1 branches to the IL routine for S1.

(2)

 If the server module S1 has not been loaded, a return to the calling program X is effected directly from the IL routine.

(3)

 If the server module S1 is loaded, the IL routine branches to the server module S1.

(4)

After the server module S1 has been processed, control is returned to the calling program X.

(5)

The caller can then check the return code to obtain information on the processing of the server module.

(6)

The symbol table of the context xyz contains an entry for an ILE symbol named S1, in which the addresses of the IL routine (L) and the server module (S) are stored.