IBM SC34-6814-04 Server User Manual


 
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 routing
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” on page 628.
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 Dealing with unserviceable requests,
in the CICS Business Transaction Services manual.
Route selection
Notification
Route selection error
Routing attempt complete
Requesting/routing region
Transaction initiation
Transaction termination
Transaction abend
Target region
Figure 60. When and where the distributed routing program is invoked
Chapter 18. Writing a distributed routing program 627