Conversations That Have Errors

Conversation errors are inevitable, and your transaction program must be prepared to detect and respond to them. A transaction program uses the Report (Error) operation, described in LU 6.2 Operations, to signal the discovery of an error. Inquiry Conversation with Error summarizes an inquiry conversation in which the server finds a logical error in the inquiry.

Table 1. Inquiry Conversation with Error
Client Actions Server Actions
Send one or more records.
Receive.
Receive and process some of the inquiry records. Find a mistake.
Report (Error).
Send diagnostic error message.
Return code to Receive indicates Report (Error) by partner. Close.
Receive diagnostic message, display to user
Close

The main purpose of the Report (Error) operation is to purge all data in transaction program API buffers that was neither sent nor received. The Report (Error) operation also gives the right to send to the transaction program which discovered the error, so that the transaction program can transmit diagnostic data to its partner. Your transaction program must specify the contents of the diagnostic message and the operations that follow.