Note that the routing program is given the name of the channel, not its address, and so is unable to use the DYRCHANL field to inspect or change the contents of the containers.
When a LINK or START command passes a COMMAREA rather than a channel, the routing program can, depending on the type of request, inspect or change the COMMAREA’s contents. For LINK requests and transactions started by terminal-related START requests (which are handled by the dynamic routing program) but not for non-terminal-related START requests (which are handled by the distributed routing program), the routing program is given, in the DYRACMAA field of DFHDYPDS, the address of the application’s COMMAREA, and can inspect and change its contents.
To give the routing program the same kind of functionality with channels, 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.
If you are changing a program to pass a channel rather than a COMMAREA, you could use its existing COMMAREA structure to map DFHROUTE.
For introductory information about dynamic and distributed routing, see the CICS® Intercommunication Guide. For information about writing a dynamic or distributed routing program, see the CICS Customization Guide.