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.
If the routing program sets DYROPTER to 'Y', it is re-invoked on the target region:
v When the transaction associated with the routed request is about to be initiated
on the target region
v If the transaction terminates successfully
v If the transaction abends.
This is effective only if the target region is CICS TS OS/390, Version 1.3 or later.
Each time it is invoked on the target region, the routing program could update a
count of transactions that are currently running on that region. When it is invoked
for routing, the routing program could use the counts maintained by all the regions
in the routing set (including itself) as input to its routing decision. This requires that
each region in the routing set has access to a common data set on which the
counts are recorded.
Routing inbound Web service requests
You can use a distributed routing program to dynamically route inbound Web
service requests.
Which requests can be dynamically routed?
The target application program is eligible for workload management when one of
the following is true:
v The target program is defined as DYNAMIC
v A program in the pipeline has changed the contents of container
DFHWS-USERID from its initial value
v A program in the pipeline has changed the contents of container
DFHWS-TRANID from its initial value.
In addition, routing will only take place if the TRANSACTION definition for the
transaction named in DFHWS-TRANID specifies one of the following sets of
attributes:
DYNAMIC(YES)
The transaction is routed using the distributed routing model, in which the
routing program is specified in the DSRTPGM system initialization
parameter.
DYNAMIC(NO) and REMOTESYSTEM(sysid)
The transaction is routed to the system identified by sysid.
If the request is fully eligible for dynamic routing, the distributed routing program is
invoked for routing.
“Daisy-chaining” is not supported. That is, once a request has been dynamically
routed to a target region it cannot be dynamically routed from the target to a third
Chapter 18. Writing a distributed routing program 641