When the dynamic routing program is invoked
Program-link requests are both “traditional” CICS®-to-CICS DPL calls and requests received from outside CICS. For eligible program-link requests the dynamic routing program is invoked at the following points.
- Before the linked-to program is executed, to either:
- Obtain the SYSID of the region to which the link should be routed. Note: The address of the caller's communication area (COMMAREA) is passed to the routing program, which can therefore route requests by COMMAREA contents if this is appropriate.
- Notify the routing program of a statically-routed request. This occurs if the program is defined
as DYNAMIC(YES)—or is not defined—but the caller specifies the name of a remote region on the SYSID
option on the LINK command.
In this case, specifying the target region explicitly takes precedence over any SYSID returned by the dynamic routing program.
- Obtain the SYSID of the region to which the link should be routed.
- If an error occurs in route selection—for example, if the SYSID returned by the dynamic routing program is unavailable or unknown, or the link fails on the specified target region—to provide an alternate SYSID. This process iterates until either the program-link is successful or the return code from the dynamic routing program is not equal to zero. If the return code is not zero, CICS attempts to execute the program in the routing region.
- After the link request has completed, if reinvocation was requested by the routing program.
- If an abend is detected after the link request has been shipped to the specified remote system, if reinvocation was requested by the routing program.