Ending the conversation

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 FREE command to release the session.

Ending a conversation normally

The SEND LAST command is used to terminate a conversation. It should be used in conjunction with either the WAIT option or the SYNCPOINT command, and followed by the FREE command. However, SEND LAST WAIT causes the conversation to end before any subsequent syncpoint can be propagated to the partner transaction. This may mean that the protected resources in one system could be committed whilst those in the other system could be backed out.

From the state table it can be seen that it is possible to end a conversation by issuing the FREE command provided the conversation is in send state (state 2). This generates an implicit SEND LAST WAIT command before the FREE is executed and therefore is not recommended.

Note:
A distributed transaction should not end a conversation by issuing an EXEC CICS® RETURN command, but instead follow the sequence of commands described above. The issue of an EXEC CICS RETURN could lead to one or both transactions ending abnormally.

Unexpected termination of a conversation

If a partner systems fails, or a session goes out of service in the middle of a DTP conversation, the transaction is terminated abnormally.

[[ Contents Previous Page | Next Page Index ]]