The following sections describe the different ways a conversation can end, either unexpectedly or under transaction control. To end a transaction, one transaction issues a request for termination and the other receives this request. Once this has happened the conversation is unusable and both transactions must issue a GDS FREE command to release the session.
The GDS SEND LAST command is used to terminate a conversation. It should be used in conjunction with either the WAIT or CONFIRM options or the SYNCPOINT command (depending on the conversation sync level). Table 30 describes this.
Sync level | Command sequence |
---|---|
0 |
GDS SEND LAST WAIT GDS FREE |
1 |
GDS SEND LAST CONFIRM GDS FREE |
2 |
The GDS ISSUE ABEND command provides a means of abnormally ending the conversation. It is valid for all levels of synchronization, but should be avoided at sync level 2, because its use at the wrong time can lead to a loss of data integrity.
GDS ISSUE ABEND can be issued by either transaction, whether it is in send or receive state, at any time after the conversation has started. For a transaction in send state (state 2), any deferred data that is waiting for transmission is flushed before the GDS ISSUE ABEND command is transmitted.
The transaction that issues the GDS ISSUE ABEND command is not itself abended. It must, however, issue a FREE command for the conversation unless it is designed to terminate immediately.
If a GDS ISSUE ABEND command is issued in receive state (state 5), CICS purges all incoming data until an INVITE, syncpoint request, or LAST indicator is received. If LAST is received, no abend indication is sent to the partner transaction.
If a GDS ISSUE ABEND is received, both CDBERR and CDBFREE set (X'FF'), the first two bytes of CDBERRCD contain X'0864'. The only command that can be subsequently issued for the conversation is GDS FREE.
If a partner systems fails or a session goes out of service in the middle of a DTP conversation, the conversation is terminated abnormally and the application informed the next time a command accesses the session. In addition, both CDBERR and CDBFREE are set on (X'FF'), and CDBERRCD contains one of the following values representing the reason for the error.