Using the OTMAYPRX user exit and DFSYDRU0 exit routine to determine destination

Transaction pipe names can be the same as IMS LTERM names or APPC/IMS TP names.

To clarify whether a destination is for OTMA, IMS provides OTMA exit routines that can specify where IMS should look to resolve the destination names:
  • The OTMA Destination Resolution user exit (OTMAYPRX)
  • The OTMA User Data Formatting exit routine (DFSYDRU0)

In an IMS subsystem, you can have many DFSYDRU0 exit routines, but only a single OTMAYPRX user exit.

The exit routines cannot change the actual destination name.

Determining the destination for an OTMA message requires two phases. In each phase, an OTMA exit routine can be called:
Phase 1
The Destination Resolution user exit (OTMAYPRX) is called to determine the initial destination for the output.

The user exit can determine whether the message should be directed to an OTMA client or to IMS TM for processing. The exit routine cannot determine the final destination (because insufficient parameters are passed to it).

Phase 2
The DFSYDRU0 exit routine is called to determine the final destination for the output. Each client can specify a separate DFSYDRU0 exit routine.

The name of the DFSYDRU0 exit is determined by the user or an OTMA client. Each client can have its own dedicated DFSYDRU0 exit. To view the name of the DFSYDRU0 exit routine associated with an OTMA client, issue the /DISPLAY TMEMBER command.

Both of these exit routines receive control when an IMS application program issues an ISRT call to an alternate program communication block (PCB), or issues CHNG or PURG calls. But if the destination is the name of an IMS scheduler message block (SMB), the DFSYDRU0 exit routine does not receive control. The following figure illustrates the two phases of message destination determination.

Figure 1. How the OTMAYPRX and DFSYDRU0 OTMA user exits determine message destination
begin figure description. This figure is described in the surrounding text. end figure description.
Recommendations: 
  • The destination name that is specified at offset +8 in the input parameter list of the DFSYDRU0 exit can come from the original CHNG call, the OTMA destination descriptor, or a TPIPE override that is set by the OTMAYPRX exit routine. If the input flag X'40' is specified at offset +27 in the input parameter list of the DFSYDRU0 exit, the destination name from the original CHNG call is included in the input parameter list of the DFSYDRU0 exit routine at the offset +104.
  • Because of the potential conflict with the SMB name, OTMA clients should avoid using a transaction pipe name as either the transaction name or the routing key.
  • The OTMAYPRX and DFSYDRU0 OTMA user exits should be the same for the front-end and back-end IMS systems within a shared queues group. If the exit routines are different for one or more back-end IMS systems, asynchronous output might be sent to different destinations, depending on which back-end IMS system processed the input.

    To ensure prompt delivery of the output, enable OTMA on every back-end IMS system in the shared queues group. If a back-end IMS system does not have OTMA enabled, any asynchronous OTMA output that is inserted into an alternate PCB is simply queued and not delivered until the operator issues a /STA OTMA command.

  • Specifying OTMAMD=Y in the IMS PROCLIB member DFSPBxxx can direct your OTMA message from the OTMAYPRX user exit to a different DFSYDRU0 exit routine without rerouting.
  • Specifying OTMASP=Y in the IMS PROCLIB member DFSPBxxx always creates a SYNC tpipe for the ALT-PCB output message.
Note: The SCD and PST addresses are available in the input parameter for both OTMA user exits. The address of the first segment of the output message is not passed to either user exit.