The APPC basic API provides commands to enable transactions to pass error notification across a conversation. There are three commands depending on the severity of the error. The most severe, GDS ISSUE ABEND, causes the conversation to terminate abnormally and is described in Emergency termination of a conversation. The other two commands are described in the following section.
If a transaction is receiving data on a conversation and wishes to send, it can use the GDS ISSUE SIGNAL command to request that the partner transaction does a GDS SEND INVITE. When the GDS ISSUE SIGNAL request is received, CDBSIG is set (X'FF'). Note that on receipt of a signal, a transaction is not obliged to issue GDS SEND INVITE.
If a transaction wishes 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.
[[ Contents Previous Page | Next Page Index ]]