IERCD and N1RTY
The last two routines for interacting with the error handling system, IERCD and N1RTY, are INTEGER functions and are described in the following material.
IERCD retrieves the integer code for an informational error. Since it has no arguments, it may be used in the following way:
ICODE = IERCD( )
The function retrieves the code set by the most recently called IMSL routine.
N1RTY retrieves the error type set by the most recently called IMSL routine. It is used in the following way:
ITYPE = N1RTY(1)
ITYPE = 1, 2, 4, and 5 correspond to error severity levels 1, 2, 4, and 5, respectively. ITYPE = 3 and ITYPE = 6 are both warning errors, error severity level 3. While ITYPE = 3 errors are informational errors (IERCD( ) ≠ 0), ITYPE = 6 errors are not informational errors (IERCD( ) = 0).
For software developers requiring additional interaction with the IMSL error handling system, see Aird and Howell (1991).
Examples
Changes to Default Actions
Some possible changes to the default actions are illustrated below. The default actions remain in effect for the kinds of errors not included in the call to ERSET.
To turn off printing of warning error messages:
CALL ERSET (3, 0, ‑1)
To stop if warning errors occur:
CALL ERSET (3, ‑1, 1)
To print all error messages:
CALL ERSET (0, 1, ‑1)
To restore all default settings:
CALL ERSET (0, 2, 2)