Dealing with an abend on the target region
If a routed request fails on the target region, CICS® invokes the routing program for transaction abend, returning the abend code in field DYRABCDE of the communications area.
This invocation occurs on the target region, and only if the routing program has specified, on a previous call on the routing region, that it should be reinvoked on the target region.
The recommended way of dealing with an abend on the target region
is as follows:
- Code your routing program so that, on each route selection (and route selection error) call, it specifies that it is to be reinvoked (for transaction initiation, termination, and abend) on the target region.
- If the routing program is invoked, on the target region, for transaction abend, it conveys full details of the failed request to the routing region. It could, for example, write the communications area to a shared resource, such as an RLS file or a shared data table.
- The routing program on the routing region checks the shared resource at predetermined intervals.
- When the routing program on the routing region discovers that
a routed request has failed, it performs the following steps:
- Removes the target region from its routing set.
- Retries the request on another region. It tries repeatedly until either the request is successful or all possible AORs have been tried unsuccessfully. In the latter case, it returns an error response to the client.