If an error occurs in route selection
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— the dynamic routing program is invoked again.
When the program is re-invoked, you have a choice of actions:
- You can tell CICS® not to continue trying to route the request, by issuing a non-zero return code in DYRRETC.
- If the reason for the error is that no sessions are immediately available to the remote system, you can reset field DYRQUEUE to ‘Y' (it must previously have been set to ‘N'—the request is not to be queued—for this error to occur), issue a return code of ‘0' in DYRRETC, and try to route the request again.
- You can change the sysid, and issue a return code of ‘0' in DYRRETC to try to route the request again. Note that if you change the sysid, you may also need to supply a different remote program name or transaction ID.
A count of the times the routing program has been invoked for routing purposes for this request is passed in field DYRCOUNT. Use this count to help you decide when to stop trying to route the transaction.
Special case—care!
If all the following
are true, the route selection call fails but the routing program
is not reinvoked for a route selection error:
- The program is not defined on the local region.
- Program autoinstall is not active on the local region.
- 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:
- Install a program definition on the local system, specifying DYNAMIC(YES).
- Set program autoinstall active, using it to install a definition that specifies DYNAMIC(YES).