This section discusses some significant ways in which the distributed routing interface differs from the dynamic routing interface. If you have previously written a dynamic routing program, and are about to write a distributed routing program, bear in mind that:
The distributed routing program, on the other hand, uses the distributed model, which is a peer-to-peer system; the routing program itself is distributed. The routing program that is invoked at initiation, termination, or abend of a routed transaction is not the same program that was invoked for route selection--it is the routing program on the target region.
Because the dynamic routing program is invoked only on the routing region, the order of its invocations is strictly defined:
For a single request, the user area passed to each invocation of the dynamic routing program is the same piece of storage; any modifications made to the user area on one invocation are retained and passed to the next invocation.
The distributed routing program, on the other hand, may be invoked on the target region as well as on the routing region; because of this, the order of its invocations is less strictly defined. For example, the final invocation on the routing region (for "routing attempt complete") may occur before or after the first invocation on the target region (for "transaction initiation"). To cope with this uncertainty, the user area passed to the distributed routing program on its first invocation on the target region is a copy of the user area on the routing region. This means that any modifications to the user area made on the target region have no effect on the user area in the routing region. For more details, see the description of the DYRUSER field in Parameters passed to the distributed routing program.
These restrictions are documented more fully in the descriptions of the relevant fields in the DFHDYPDS communications area.