IBM SC34-6814-04 Server User Manual


 
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).
Using the XPCERES exit to check the availability of resources on the
target region
You can use an XPCERES global user exit program to check that all resources
required by the linked-to program are available on the target region.
To use the XPCERES exit, both the routing region and the target region must
support the “resource unavailable” condition (RESUNAVAIL). All the following
support the “resource unavailable” condition:
v CICS TS OS/390, Version 1.3, with APAR PQ73107 applied
v CICS TS for z/OS, Version 2.2, with APAR PQ74920 applied
v CICS TS for z/OS, Version 2.3 and later
The XPCERES exit is invoked, if enabled, on the target region before CICS
processes a dynamically-routed program-link request.
If, for example, the linked-to program is disabled on the target region, or a required
file is missing, your exit program can give the dynamic routing program the
opportunity to route the request to a different region. To do this, it should set a
return code of UERCRESU. This causes CICS to:
1. Return a RESUNAVAIL condition on the EXEC CICS LINK command executed
by the mirror on the target region. (This condition is not returned to the
application program.)
2. Set the DYRERROR field of the routing program’s communications area to
'F'—resource unavailable.
3. Reinvoke the routing program, on the routing region, for route selection
failure—see “If an error occurs in route selection” on page 600.
Chapter 17. Writing a dynamic routing program 601