Routing bridge requests dynamically

To run a 3270 user transaction under the control of the bridge, a client program must first issue a LINK, ECI or EXCI call to DFHL3270 running in the bridge router region, passing a COMMAREA that contains the bridge inbound message header (BRIH).

The BRIH contains the name of the target user transaction. DFHL3270 (the bridge program) then links to the CICS® driver program, passing the COMMAREA. If the user transaction is eligible for dynamic routing, DFHL3270 calls the dynamic routing program to determine the target system where the driver program will execute.

The user transaction always executes in the same region as the driver program. The client request to run the user transaction is dynamically routed, not the user transaction.

The resource definition of the target transaction on the router region is used to determine if the bridge request to the driver program is eligible for dynamic routing. If the target user transaction is not defined in the router region, the common transaction definition specified on the DTRTRAN system initialization parameter is used to determine if the request is eligible for dynamic routing.

In session mode, the target system of the first user transaction request determines where all subsequent user transaction requests in the session are routed. Remote requests can be routed to other regions connected to the router region by MRO links, or to other systems that are connected by APPC (LUTYPE6.2) ISC links.

Note: The local system is the CICS router region where the dynamic routing program is executing.
The dynamic routing program is invoked in the following cases:
  • In single transaction mode when the transaction is defined as DYNAMIC(YES), or the transaction is not defined and the DTRTRAN transaction is defined as DYNAMIC(YES).
  • In session mode when the first user transaction is defined as DYNAMIC(YES), or the transaction is not defined and the DTRTRAN transaction is defined as DYNAMIC(YES).
  • In session mode when subsequent user transactions are defined as DYNAMIC(YES), or the transaction is not defined and the DTRTRAN transaction is defined as DYNAMIC(YES). In this case, the target system has already been determined by the first user transaction of the session, so the routing program is only invoked for notification; it cannot change the target system of the request.
  • If an error occurs in route selection, for example, if the target region returned by the routing program on its initial (route selection) call is unavailable. This allows the routing program to specify an alternate target. This process iterates until the routing program selects a target that is available, or sets a non-zero return code.
  • After the user transaction has completed, if the routing program has requested to be reinvoked at termination.