When the dynamic routing program is invoked

CICS® can invoke the dynamic routing program for eligible program-link requests.

CICS invokes the dynamic routing program in the following circumstances:
  • 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 communications 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 of the LINK command.

      In this case, specifying the target region explicitly takes precedence over any SYSID returned by the dynamic routing program.

  • 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.
    Special case! Take care!:
    If all the following are true, the route selection call fails, but the routing program is not reinvoked for a route selection error:
    1. The program is not defined on the local region.
    2. Program autoinstall is not active on the local region.
    3. On the route selection call, the routing program routes the link request to the local region.
    Therefore, to dynamically route a program-link request that the routing program may route locally, you should do either of the following:
    1. Install a program definition on the local region, specifying DYNAMIC(YES).
    2. Set program autoinstall active, using it to install a definition that specifies DYNAMIC(YES).
  • 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.
  • At the end of a unit of work, to issue a notification that the unit of work is complete, if reinvocation was requested by the routing program. CICSPlex® SM workload management uses these notifications to manage UOW affinities.

Figure 1 shows the points at which the dynamic routing program is invoked.



dfha3c00249.html | Timestamp icon Last updated: Sunday, 4 June 2017