OSI/MHS P7 Application Programmatic Interface (P7 API) Manual

OSI/MHS P7 Application Programmatic Interface (P7 API) Manual424825-001
B-1
B
Return Codes
This appendix provides the information you need to check the status of a procedure call
and determine the cause of a failure. The following information is provided:
A description of what to expect when checking the status parameter
The values of return codes passed in the status parameter of each procedure
Status Checking
Each P7 API procedure returns a code in the status parameter that indicates the
success or failure of the procedure call. The value returned in status is a pair of
16-bit integer return codes with the leftmost bits being the most significant and the
rightmost bits being the least significant. The leftmost 16 bits contain a primary return
code the rightmost 16 bits contain a return subcode.
You can use the DDL return code constants to check the value returned in the primary
return code. The type of codes returned are identified by the following prefixes:
The value returned in the rightmost 16 bits depends on the error. The possible subcode
values are described along with the primary return code values.
A value of 0 indicates that the procedure was successful. A procedure that returns a
status other than 0 does not carry out even a portion of its assigned task and indicates
that an error has occurred.
If you receive any of the errors listed in this appendix, try to solve the problem by
following the listed recovery procedure. If the problem persists, you should try to
resolve it by:
1. Resetting the statistics
2. Running the application again by using the Inspect debugger to look at your code
For information on using the Inspect debugger, see the Inspect Manual. If the Inspect
debugger fails to reveal the nature of the problem, then you need to use the SCF TRACE
PROCESS command and the PTrace utility program. For more information on
troubleshooting an application, see the OSI/MHS Configuration and Management
Manual.
Return Code Values
This subsection describes the return codes that can be values of the status parameter.
Return subcode values are described in the CAUSE text under the primary return code
value.
ZMHS-VAL-EM- Compaq proprietary return codes that are produced when the P7 API
service detects errors during initialization or session management.
ZMHS-VAL-DT- Compaq proprietary return codes that are produced when the P7 API
service detects errors during the transfer of data.