Canceling a message timer

User-written IMS Connect client applications can cancel the active message timer when waiting on output from the data store.

The cancel timer feature prevents IMS Connect clients that have specified a large timeout interval from being lost in the event that the data store does not send a reply. Without the cancel timer feature an IMS Connect STOPCLNT command would have to be issued to clear the socket connection. When a request to cancel the timer is submitted, IMS Connect notifies the client.

The cancel timer feature is supported by user-written message exit routines and the sample user message exit routines HWSSMPL0 and HWSSMPL1.

Note that if a client is waiting in a CONN state after issuing a RESUME TPIPE call and the data store is closed by IMS or a STOPDS command, then the client receives an RSM message with RC= X'2C' (or decimal 44).

A cancel timer request is specified by a C in the IRM_F4 field and can be submitted from either a single instance of a client or two instances of the client with the same client ID.

To submit a cancel timer request from a single client instance:

Procedure

  1. Issue SEND of ACK.
  2. Set local timer.
  3. Issue READ for Response. Timer pops rather than receipt of data.
  4. Issue Disconnect.
  5. Issue Connect.
  6. Issue SEND with Cancel Timer set in the IRM.
  7. Issue Read for Cancel Timer. The user message exit issues return code 8 with a reason code of X'3B' (or decimal 59) in the RSM.
  8. Issue Disconnect.

To submit a cancel timer request from two instances of the same client with the same client ID:

  1. From first client
    1. Issue SEND of ACK (with, for example, a client ID of ICON01).
    2. Issue READ for Response.
  2. From second client instance
    1. Issue Connect.
    2. Issue SEND with Cancel Timer set in the IRM (with client ID of ICON01).
    3. Issue Read for Cancel Timer. The user message exit issues return code 8 with a reason code of X'3B' (or decimal 59) in the RSM.
    4. Issue Disconnect.
  3. First client receives an RSM with a return code of X'2C' (or decimal 44) and a reason code set to the value of the timer value. This instance remains connected and is in RECV state.
    1. Issue Disconnect or continue processing.