Changing the target CICS region
The DYRSYSID field of the communications area passed to the distributed routing
program initially contains the system identifier (sysid) of the default target region to
which the process or activity is to be routed. This is derived from the value of the
REMOTESYSTEM option of the installed transaction definition on the requesting
region. If REMOTESYSTEM is not specified, the sysid passed is that of the local
CICS region.
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 activity
When the routing program is invoked for routing, if you want the process or activity
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
RUN request locally. When it executes the request locally, CICS writes message
DFHSH0102 to the CSSH transient data queue.
v If the two sysids are not the same, CICS routes the request to the remote CICS
region.
If you want CICS to treat the request as
unserviceable
, return a non-zero value. For
information about unserviceable requests, see the
CICS Business Transaction
Services
manual.
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—the distributed 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.
routing BTS activities
Chapter 17. Writing a distributed routing program 579
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|