Return codes

All functions that run successfully should produce a return code of 0. If an error occurs, RAM developers may return a code based on Table 1 below

Table 1. Return code ranges
Error Type Range
CARMA Errors 4 – 99
Generic RAM Errors 100 – 200
Software Bridge Errors 201 – 500
RAM Specific Errors 501 – 900
TSO Errors 901 – 999

If an error occurs, RAM developers may return a code between 100 and 200 or between 501 and 900. Codes ranging from 100 to 200 are reserved for generic errors that all RAMs may face. Codes ranging from 501 to 900 should be used for any errors that are specific to a certain RAM. Likewise, CARMA may return error codes between 4 and 99, a software bridge created between CARMA and a workstation client may return error codes between 201 and 500, and TSO errors may be flagged by returning error codes between 901 and 999. See Return codes for a list of the predefined error codes. When an error results in a return code between 501 and 900, the RAM should fill the error buffer with the details of the error. When an error results in a return code between 100 and 200, CARMA will be able to recognize the error and will put the appropriate error message in the error buffer. If the RAM provides additional error information using its error buffer, CARMA will append this information to the error message it produces.