How to: |
The SYS_MGR.DBMS_ERRORCODE command enables you to retrieve error codes returned by the DBMS server and then take appropriate action. For example, a developer might want to take a different course of action for an INSERT that fails because the user does not have INSERT rights versus a referential integrity failure.
The syntax is
SYS_MGR.DBMS_ERRORCODE ;
For example, the following Maintain code will retrieve an error code from a DBMS, and if it is a specific code, branches to some appropriate code:
Compute ErrCode/a3 = SYS_MGR.DBMS_ERRORCODE ; If ErrCode EQ '515' goto BadInsert;