When Open ServerConnect executes a command, it uses the SPAREA SPRC field to send a return code that indicates the success or failure of the command.
If the command succeeds, the SPRC field is set to '000'.
If an error occurs:
The SPRC field is set to a 3-character Open ServerConnect error code. Mainframe Connect Client Option and Server Option Messages and Codes contains the Open ServerConnect error codes related to RSPs.
Open ServerConnect issues a STATUS command.
The RSP is not allowed to issue any more commands. The RSP should perform any termination processing and then return control to Open ServerConnect.
The following COBOL II statements show an example of return code checking after issuing an OPENPIPE command:
CALL 'OPENPIPE' USING SPAREA IF SPRC NOT EQUAL '000' THEN GOTO PERFORM-TERMINATE.
In addition to '000', the SPRC field can contain other codes. For example: ’EOF’, ‘ACE’, and ‘CAN’. See the following table for an explanation of those codes and the SPAREA fields used to communicate status and messages between Open ServerConnect and the RSP.
SPAREA Field |
Use |
---|---|
SPRC |
RSP API indicates the success or failure of an RSP command in this field. Possible values are:
|
SPSTATUS |
RSP API communicates the status of processing in the remote database to the RSP. The RSP also uses the SPSTATUS field to communicate status on its own processing to the client application. Possible values are:
|
SPMSG |
RSP communicates messages back to the client using this field. |
SPCODE |
An error code that is sent in a message to the client application appears in this field. |
For a complete list of MainframeConnect error messages, see Mainframe Connect Client Option and Server Option Messages and Codes.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |