Demanding INVITE from the partner transaction
If a transaction wants to send an immediate error notification to the partner transaction it can use the GDS ISSUE ERROR command.
This command is also one of the preferred negative responses to GDS SEND CONFIRM. However it should not be used to reject GDS ISSUE PREPARE, SYNCPOINT or SYNCPOINT ROLLBACK. When the GDS ISSUE ERROR is received, CDBERR is set ( X'FF' ) and the first two bytes of CDBERRCD are X'0889'.
If a GDS ISSUE ERROR command is used in receive state (state 5), all incoming data is purged until an INVITE, SYNCPOINT or LAST is received. If LAST is received, no error indication is sent to the partner transaction, CDBFREE is set ( X'FF' ) and the conversation is switched to free state (state 12).
If LAST is not received, the conversation is switched to send state (state 2). It is normal to communicate the reason for the error to the partner transaction. The GDS SEND INVITE WAIT command could be used to send an appropriate error message and then a GDS RECEIVE could be used to receive a reply.
Because GDS ISSUE ERROR is allowed in both send state (state 2) and receive state (state 5), it is possible for both communicating transactions to use GDS ISSUE ERROR at the same time. When this happens, only one of the GDS ISSUE ERROR commands is effective. The other is purged with incoming data. However, both commands will appear to have completed successfully and the transaction whose GDS ISSUE ERROR was purged will pick up CDBERR (= X'FF' ) on a subsequent command.