Error Processing - Overview
The EUS Toolkit provides a method for capturing and controlling normal error processing within programs. The developer has the flexibility to either store error messages for display at a later time or to handle them immediately. Additionally, there is a separate program that can be used to handle Unexpected Errors.
Message Processing
Using the _warn.utl utility, developers can stack messages and display them later by using the _saywarn.utl utility. Messages are maintained using a global string with the keyword (#Warn).
Using _warn.utl, it is also possible to stack error messages and then, using _saywarn.utl, dump them into a message file that can be reviewed later.
Program Debug Tool
The _warn.utl utility accepts a special parameter, DEBUG$, that provides special information to developers for later use while correcting new programs. The DEBUG$ parameter should include information to help in debugging, usually, PGM(-2), to tell developers which program was executing.
If specified, the debug string and current value of the warning buffer are saved to the global (#SDUMP). After CALLing _saywarn.utl, the contents of the (#SDUMP) global are transferred to the (#Stack dump) global.