IBM SC33-1683-02 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
dynamic routing program is unavailable or unknown, or the link fails on the specified
target region— the dynamic routing program is invoked again. When this happens,
you have a choice of actions:
v You can tell CICS not to continue trying to route the request, by issuing a
non-zero return code in DYRRETC.
v If the reason for the error is that no sessions are immediately available to the
remote system, you can reset field DYRQUEUE to ‘Y’ (it must previously have
been set to ‘N’—the request is not to be queued—for this error to occur), issue a
return code of ‘0’ in DYRRETC, and try to route the request again.
v You can change the sysid, and issue a return code of ‘0’ in DYRRETC to try to
route the request again. Note that if you change the sysid, you may also need to
supply a different remote program name or transaction ID.
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 transaction.
Special case—care!
If all the following are true, the route selection call fails
but the routing program
is not reinvoked for a route selection error
:
1. The program is not defined on the local region.
2. Program autoinstall is not active on the local region.
3. On the route selection call, the routing program routes the link request to
the local region.
Therefore, to dynamically route a program link request
that the routing
program may route locally
, you should do either of the following:
1. Install a program definition on the local system, specifying
DYNAMIC(YES).
2. Set program autoinstall active, using it to install a definition that specifies
DYNAMIC(YES).
Invoking the dynamic routing program at end of routed requests
If you want your dynamic routing program to be invoked again when the routed
request has completed, you must set the DYROPTER field in the communications
area to 'Y' before returning control to CICS. You might want to do this, for example,
if you are keeping a count of the number of link requests currently executing on a
particular CICS region.
If you have set DYROPTER to 'Y', and the linked program abends, the dynamic
routing program is invoked to notify it of the abend.
Modifying the application’s input communications area
Sometimes you may want to modify the routed application’s communications area.
For example, if your routing program changes the name of the remote program, it
may also need to change the input communications area passed to the program.
Field DYRACMAA of the routing program’s communications area enables you to do
dynamic routing of DPL requests
Chapter 16. Writing a dynamic routing program 561
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|