IMS Resource Adapter Reroute Support

Technote (FAQ)


Question

This technote describes how the reroute function works in IMS resource adapter versions 2.2.3, 2.2.4, 9.1.0.1.1, 9.1.0.1.2, 9.1.0.2 and 9.1.0.2.1. It clarifies the situations in which reroute does and does not occur.

Answer

1. Overview

Reroute support was introduced in IMS resource adapter versions 2.2.3, 9.1.0.1.1 and 9.1.0.2 for shareable persistent socket connections that use IMS interaction verb SYNC_SEND_RECEIVE. It determines if undelivered output is to be rerouted to a named destination that is specified in the reRouteName field.

reRouteName and reRoute are new properties added in IMSInteractionSpec for reroute support. The default value for reRoute property is FALSE. If reRoute is set to TRUE, the asynchronous output is queued to the TPIPE associated with the IMS resource adapter destination specified in the reRouteName field instead of the TPIPE associated with the generated clientID. If no reRouteName is provided, the value for the reRouteName property is the value specified in the IMS Connect configuration file. If no value is specified in the IMS Connect configuration file, the value “HWS$DEF” is used as the reroute destination.

Reroute is not applicable for any interactions on dedicated persistent socket connections. It applies to commit mode 0 interactions and it does not apply to commit mode 1 interactions. However, if a commit mode 1 interaction executes a program-to-program switch, the spawned program will run commit mode 0 and therefore the reroute support will apply.

2 ReRoute of program-to-program switch messages

2.1 Background information
A program-to-program switch occurs when an IMS application program that is already executing requests a new transaction be put on the IMS message queues for standard scheduling and execution. A commit mode 1 or commit mode 0 transaction can spawn one or more program-to-program switch transactions.

  • If the program to program switch was spawned by a commit mode 0 transaction, the subsequent transactions will be commit mode 0 transactions.
  • If the program to program switch was spawned by a commit mode 1 transaction, the subsequent transactions will be:
    • Commit mode 0 transactions, if the original commit mode 1 transaction completed the ISRT to IOPCB
    • Otherwise, a race condition exists. The first transaction which completes the ISRT to IOPCB will result in a commit mode 1 output message and the rest of the ISRTs to IOPCB will be commit mode 0.
Note: Most spawned programs are commit mode 0 transactions, but it is not guaranteed.

2.2 Normal Path
Commit Mode 1
Currently, commit mode 1 interactions not in the scope of a transaction run syncLevel NONE. Secondary output from a program-to-program switch will be rerouted if it is spawned by a SYNC_SEND_RECEIVE interaction with commit mode 1 and syncLevel NONE. After returning the output of the original interaction, IMS Connect considers the secondary output as undeliverable and will queue it to the TPIPE associated with the reroute destination.

Commit Mode 0
Secondary output from a program-to-program switch will not be rerouted if it is spawned by a SYNC_SEND_RECEIVE interaction with commit mode 0. Since syncLevel CONFIRM is required for commit mode 0 and the IMS resource adapter only processes one output per interaction, the IMS resource adapter always issues a NAK for any secondary output. All secondary output will be queued on the TPIPE associated with the generated clientID. A future enhancement is under investigation that will make reroute apply when IMS resource adapter issues a NAK.

2.3 Error Path
Commit Mode 1
Secondary output from a program-to-program switch will be rerouted if execution timeout occurs on the original commit mode 1 interaction with syncLevel NONE. IMS Connect considers any remaining output as undeliverable. For commit mode 1 interactions, the primary output is discarded and the secondary output is queued on the TPIPE associated with the reroute destination.

Commit Mode 0
  • All output from a program-to-program switch will be rerouted if execution timeout occurs on the original commit mode 0 interaction. Both the primary and secondary output are considered undeliverable by IMS Connect and queued on the TPIPE associated with the reroute destination.
  • Only the secondary output from a program-to-program switch will be rerouted if execution timeout occurs on the internal ACK of the primary output of the original commit mode 0 interaction. In this case the primary output is delivered to the Java client but the secondary output is queued on the TPIPE associated with the reroute destination.

2.4 Express PCB
An express PCB is an alternate response PCB that allows your program to transmit the message to the destination earlier than when you use a non-express PCB. The alternate response PCB of a program-to-program switch can be an express PCB or a non-express PCB.
  • For a non-express PCB, the message is not made available for transmission to its destination until the program reaches a commit point.
  • For an express PCB, when IMS has the complete message, it makes the message available for transmission to the destination. A “race condition” occurs, that the second transaction may complete before the original transaction completes.
If the spawned subsequent transaction is running express PCB, it may generates the output prior to the IOPCB ISRT from the original commit mode 1 or commit mode 0 interaction. In this case, the output returned from IMS resource adapter is not guaranteed to be the primary output for the original commit mode 1 or commit mode 0 interaction or the secondary for the subsequent commit mode 0 interactions – it will depend on the order of the output returned from IMS. However, the reroute behavior is the same.

3 ReRoute of multiple output messages
A single IMS application can generate multiple output messages by issuing multiple ISRT IOPCB calls.
  • For commit mode 1, the multiple output messages will be delivered to the IMS resource adapter by IMS Connect together as a single output message with multiple segments. If the multi-segment output message cannot be delivered to the IMS resource adapter - for example, if execution timeout occurs – it will be discarded, since reroute does not apply to commit mode 1 interactions.
  • For commit mode 0, the multiple output messages will be delivered to IMS resource adapter from IMS Connect separately as multiple output messages per single interaction. As mentioned earlier, the IMS resource adapter only processes one output message per interaction, and always issues a NAK for any secondary output. So only the first output message will be delivered to the Java client; the remaining output messages, although delivered to the IMS resource adapter by IMS Connect, will be NAKed by the IMS resource adapter and will be queued.
  • Reroute does not apply if IMS Connect received the NAK from IMS resource adapter; output will be queued on the TPIPE associated with the IMS resource adapter generated clientID. A future enhancement in this area is under investigation.
  • Reroute applies if IMS Connect failed to deliver any of the output messages due to execution timeout; output will be queued on the TPIPE associated with the reroute destination.

4 ReRoute of undelivered output messages from OTMA to IMS Connect
Reroute does not apply if OTMA is unable to deliver output messages to IMS Connect. Currently the reroute function provided by the IMS resource adapter only applies to output that was not delivered to the IMS Resource adapter by IMS Connect. A future enhancement is under investigation that will provide the reroute function for output was not delivered to IMS Connect by OTMA and for output that the IMS Resource adapter receives from IMS Connect but that the IMS Resource adapter cannot deliver to the Java client.

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

IMS Tools
IMS Connector for Java

Software version:

2.2.0

Operating system(s):

z/OS

Reference #:

1214651

Modified date:

2005-08-18

Translate my page

Machine Translation

Content navigation