Using RPG-Specific Handlers
ILE RPG provides
four ways for you to enable HLL-specific handlers and to recover from
the exception:
- error indicators or 'E' operation code extender
- MONITOR group
- INFSR error subroutine
- *PSSR error subroutine.
You can obtain more information about the error which occurred by coding the appropriate data structures and querying the relevant data structure fields.
If you are using the 'E' extender instead of error indicators, the relevant program and file error information can be obtained by using the %STATUS and %ERROR built-in-functions.
This section provides some examples of how to use each of these RPG constructs. The IBM® Rational® Development Studio for i: ILE RPG Reference provides more information on the *PSSR and INFSR error subroutines, on the EXSR operation code, and on the INFDS and PSDS data structures.