RSP4C.LOG sample results  Keyword sample code fragment

Appendix D: RSP4C Keyword Variable Sample RSP

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 following figure contains the results that the client application receives:

Figure D-4: 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 following figure contains the results that the client application receives:

Figure D-6: 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.





Copyright © 2005. Sybase Inc. All rights reserved. Keyword sample code fragment

View this book as PDF