IBM SC34-6814-04 Server User Manual


 
When it is invoked for route selection, the distributed routing program can change
the target region by changing the value in DYRSYSID.
If the specified sysid is invalid, or cannot be found, SYSIDERR is returned to the
distributed routing program—which may deal with the error by returning a different
sysid—see “If an error occurs in route selection.”
If the routing program changes the sysid when it is invoked for notification, routing
complete, transaction initiation, transaction termination, or abend, the change has
no effect.
Telling CICS whether to route the method request
When the routing program is invoked for routing, if you want the method request to
be routed (whether you have changed any values or not) return a zero value to
CICS in field DYRRETC of the communications area. When you return control to
CICS with return code zero, CICS first compares the returned sysid with its own
local sysid:
v If the sysids are the same (or the returned sysid is blank) CICS executes the
request locally.
v If the two sysids are not the same, CICS routes the method request to the
remote CICS region.
If you want CICS to reject the request, return a non-zero value. The client program
receives an exception condition, indicating that the request has been rejected by
the routing program.
Returning a value in DYRRETC has no effect when the routing program is invoked
for notification, routing complete, transaction initiation, transaction termination, or
abend.
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—CICS places the reason for
the failure in field DYRERROR of the communications area and invokes the
distributed routing program 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 to reject 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.
634 Customization Guide