Retrieving Runtime Errors

You can determine the meanings of your database error codes by referring to the database documentation. Here are methods for storing the complete error code and some helpful text that describes it.

You can retrieve a secondary error code by using selected runtime options, or by calling the library routine C$RERR, described in C$RERR. Note that you can pass two parameters to C$RERR for interface errors (rather than just one). The first parameter retrieves the code; the second parameter retrieves a message associated with the error condition.

Note: For Oracle users: Because 9D takes two bytes and Oracle secondary errors can be four bytes, the first parameter should be PIC x(6).

You can retrieve runtime errors in three ways, as described in these topics: