By Ben Johnson and Jack Yuan
Has your IMS Connect client application ever had trouble reestablishing a TCP/IP connection with IMS Connect that was unexpectedly lost? Have you ever received the IMS Connect message, HWSS0742W, telling you that your client can’t send its message because a “duplicate client ID has been detected? Did that HWSS0742W message make you want to pull your hair out because you only have one client with that ID? If the answer to any of these questions is yes, then rest easy. Help has arrived in the form of the new “cancel client ID” option of IMS Connect.
First, let’s explain the why this problem occurs: IMS Connect requires the IDs of all of its client applications to be unique. It rejects any client that tries to connect with an ID that is a duplicate of an ID that is already being used by another client connection. Now, if a TCP/IP connection between IMS Connect and a client with an ID of X terminates abruptly (due to, say, a TCP/IP or client application failure), and client X attempts to reconnect before IMS Connect knows client X is gone, IMS Connect rejects the reconnection attempt and issues HWSS0742W, saying in effect, “I can’t have two clients named X.” Client X is then stuck and cannot send its transactions to IMS until IMS Connect detects the failure and cleans up the failed connection.
IMS Connect’s “cancel timer” option, which has been around for a while, offers some help, but it requires that the client application be coded to recognize the HWSS0742W message and to respond with the cancel timer option specified in the IMS Request Message (IRM) header. And, if you distribute your incoming TCP/IP connections with something like the z/OS Sysplex Distributor, this option may be no help at all.
What can help you is the cancel client ID option delivered recently for IMS Connect by IMS Version 10 APAR PK73829. The cancel client ID option offers a way for clients to preempt duplicate client ID errors by telling IMS Connect on incoming connection requests that if another client is already using the same ID, get rid of that other client and let me connect. When the cancel client ID option is specified (by specifying X'80' (IRM_F3_CANCID) in the IRM_F3 field of the user section of the IRM message header), IMS Connect checks for duplicate client IDs on the port, closes any connection with the ID, establishes the new connection, and proceeds with the new transaction request. To let you know that all this has happened, IMS Connect also issues message HWSS0743I and then your client and IMS Connect can continue on their merry way, happily sending transactions to IMS.