resources, because changes to those resources may be committed or backed
out inadvertently as a result of logic in the routed program.
v If you want to keep information about how link requests are routed, it must be
done in the user routing program, perhaps by writing the information to a
temporary storage queue.
v The dynamic routing program can be RMODE ANY but must be AMODE 31.
Modifying the application’s containers
This section applies to the routing of:
v Transactions started by terminal-related START requests (described in “Routing
transactions dynamically” on page 590)
v Program-link (DPL) requests (described in “Routing DPL requests dynamically”
on page 597)
v Non-terminal-related START requests (described in “Routing non-terminal-related
START requests” on page 637)
If the user application uses a channel, rather than a communications area, the
routing program is given, in field DYRCHANL, the name of the channel. Because
the routing program is given the name of the channel, not its address, it is unable to
use the contents of DYRCHANL to inspect or change the contents of the channel’s
containers.
However, an application that uses a channel can create, within the channel, a
special container named DFHROUTE. If the application issues a LINK or
terminal-related START request (but not a non-terminal-related START request) that
is to be dynamically routed, the dynamic routing program is given, in the
DYRACMAA field of DFHDYPDS, the address of the DFHROUTE container, and
can inspect and change its contents.
Routing by user ID
Optionally, your routing program can route requests based on the CICS user ID
(userid) associated with the request. The DYRUSERID field of the communications
area contains the userid. When it is invoked for routing or because of a
route-selection error, your routing program can base its routing decision on the
contents of this field. For details of how the userid is set for different types of
request, see the description of the DYRUSERID field in “Parameters passed to the
dynamic routing program.”
Parameters passed to the dynamic routing program
Figure 59 on page 608 shows all the parameters passed from the CICS relay
program, to the dynamic routing program by means of a communications area. The
communications area is mapped by the copy book DFHDYPDS, which is in the
appropriate CICS library for all the supported programming languages.
Chapter 17. Writing a dynamic routing program 607