RSP4C error handling

The examples in this section demonstrate how the sample RSP suppresses the error code or the text of the error message.

No error code

The code in the following figure passes &ERRORMSG= to ERROR-CHECK.

Figure D-3: ERRORMSG example

The figure shows an example of ERRORMSG.

The following figure contains the results that the client application receives:

Figure D-4: ERRORMSG response

The figure shows an example of ERRORMSG response.

The RSP code does not set

SPSTATUS='E'

and so does not pass a value through the SPRC field. As a result, the “DG21002: Result failed. Database server error code” message does not display an error code.

No message

The code in the following figure passes &STATUSMSG= to STATUS-CHECK.

Figure D-5: STATUSMSG example

The figure shows an example of STATUSMSG.

The following figure contains the results that the client application receives:

Figure D-6: STATUSMSG response

The figure shows an example of STATUSMSG response.

RSP4C’s paragraph 522-SEND-KEYWORD-HEADING on writes the following:

 **-- THE FOLLOWING IS A LIST OF THE KEYWORDS SENT. 

In RSP4C’s paragraph 524-READ-WRITE-KEYWORDS on, however, STATUS-CHECK sets the ERROR-HAPPENED switch.