IBM SC34-6814-04 Server User Manual


 
If an error occurs in route selection
If an error occurs in route selection—for example, if the sysid returned by the
distributed routing program is unavailable or unknown—the routing program is
invoked again. When this happens, you have a choice of actions:
1. You can try to route the request to a different target region, by changing the
sysid, and issuing a return code of ‘0’ in DYRRETC.
If this region too is unavailable, the routing program is again invoked for a route
selection error. 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 request.
2. You can tell CICS not to continue trying to route the request, by issuing a
non-zero return code in DYRRETC.
Invoking the distributed routing program on the target region
The route selection, notification, route selection error, and routing complete
invocations of the distributed routing program all occur on the routing region. If the
routing program wants to be re-invoked on the target region, it must set the
DYROPTER field in the communications area to 'Y'. It must do this on its initial
(route selection or notification) invocation—and again, if it is reinvoked for a route
selection error.
If the routing program sets DYROPTER to 'Y', it is re-invoked on the target region:
v When the transaction associated with the routed request is about to be initiated
on the target region
v If the transaction terminates successfully
v If the transaction abends.
This is effective only if the target region is CICS TS OS/390, Version 1.3 or later.
Each time it is invoked on the target region, the routing program could update a
count of transactions that are currently running on that region. When it is invoked
for routing, the routing program could use the counts maintained by all the regions
in the routing set (including itself) as input to its routing decision. This requires that
each region in the routing set has access to a common data set on which the
counts are recorded.
Routing by user ID
Optionally, your routing program can route requests based on the CICS user ID
(userid) associated with the request. The DYRUSERID field of the communications
area contains the userid. When it is invoked for routing or because of a
route-selection error, your routing program can base its routing decision on the
contents of this field. For details of how the userid is set for different types of
request, see the description of the DYRUSERID field in “Parameters passed to the
distributed routing program” on page 645.
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. Note that this invocation occurs on the target region, and
then only if the routing program has specified, on a previous call on the routing
region, that it should be reinvoked on the target region.
644 Customization Guide