Understanding how an Input Message sent by an IMS Connect Client to IMS Connect works when OTMA NAKs the Input Message
IMS Connect (ICON) is the TCP/IP gateway for IMS. So, besides running the traditional IMS transactions on z/OS, an IMS programmer/database administrator (DBA) can now leverage applications running on the distributed side of the world (a Java web application, for example) to be able to easily talk to IMS databases. The Java web application would go through IMS Connect to IMS as an Open Transaction Manager Access (OTMA) transaction. The IMS OTMA client communicates information to IMS and receives information from IMS in a prefix passed in front of the message (or command).
Let’s look at the following figure (Figure 1) in order to understand in detail what exactly happens when an IMS Connect Client sends an input message to IMS Connect and the input message is NAK’d (NAK stands for Negative Acknowledgement) by OTMA.
Figure 1: Pictorial representation of what happens when an IMS Connect client sends an input message to IMS Connect and OTMA NAKs the input message
- An IMS Connect Client sends an input message to IMS Connect.
- IMS Connect allocates an SVT control block for the Client, if it doesn’t already exist and sends the input message to IMS OTMA via Cross-System Coupling Facility XCF.
- OTMA processes the input message but one or more error/s occur/s. An error could be such things like invalid transaction code, stopped transaction, security failure, expired message, TIB/TPIPE flood, to name a few.
- OTMA NAKs the input message with a Sense Code (TMAMCSNC in the OTMA header) and Reason Code (TMAMCRSC in the OTMA header).
- OTMA sends the NAK message to IMS Connect via XCF.
- OTMA deletes the Transaction Instance Block (TIB) control block, if it was allocated.
- IMS Connect sends an error message (*REQSTS* if IMS Connect sample User Message Exits were in use) to the IMS Connect Client.
- If a persistent socket was in use, IMS Connect keeps the connection open and does not free the SVT control block; otherwise, the SVT control block is freed.
- The ICON Client processes the error.