Directly Linking Connection Libraries

If a process has access to the declarations of two different connection libraries, the process can link the libraries together by specifying both library identifiers in the LINKLIBRARY function. This type of linkage is referred to as direct linkage, because it bypasses the mechanisms that the system otherwise would use to locate the matching library.

Syntax for Direct Linkage

The direct form of the LINKLIBRARY function is available in both ALGOL and NEWP. The following is an example of such a LINKLIBRARY call:

RSLT := LINKLIBRARY(CLIB1, LIBRARY = CLIB2);

Specifying a Connection Index

In this example, CLIB1 and CLIB2 are both connection library identifiers. Optionally, you can include a connection index for either or both of the connection libraries, as in the following example:

RSLT := LINKLIBRARY(CLIB1[1], LIBRARY = CLIB2[3]);

Requesting and Responding Library

The system treats the first library (CLIB1) as the requesting library and the second library (CLIB2) as the responding library.

READYCL Not Necessary

It is not necessary to ready the responding library with the READYCL function.

Most Library Attributes Ignored

When you use direct linkage, the system ignores the values of the library attributes FUNCTIONNAME, INTERFACENAME, LIBACCESS, and TITLE.

LINKLIBRARY Parameters Restricted

The direct form of the LINKLIBRARY function cannot include a DONTWAIT/ DONTWAITFORFILE/WAITFORFILE option or any library attribute values.

APPROVAL Procedure Skipped

The system omits executing the APPROVAL procedure for either library unless the APPROVAL procedure is needed to determine the connection index. That is, the system executes the APPROVAL procedure for either library only if that library supports multiple connections and no connection index was specified for that library in the LINKLIBRARY statement.

Note that the LIBPARAMETER library attribute provides input to the APPROVAL procedure. If the APPROVAL procedure is going to be skipped, there is no point in assigning a LIBPARAMETER value.

Other Library Attributes

Other library attributes such as CHANGE and LIBPARAMETER have the same effects that they do for implicit or explicit linkages.