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
- Issue SEND of ACK.
- Set local timer.
- Issue READ for Response. Timer pops rather than receipt of data.
- Issue Disconnect.
- Issue Connect.
- Issue SEND with Cancel Timer set in the IRM.
- 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.
- Issue Disconnect.
To submit a cancel timer request from two instances of the same client with the same client ID:
- From first client
- Issue SEND of ACK (with, for example, a client ID of ICON01).
- Issue READ for Response.
- From second client instance
- Issue Connect.
- Issue SEND with Cancel Timer set in the IRM (with client ID of ICON01).
- 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.
- Issue Disconnect.
- 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.
- Issue Disconnect or continue processing.