Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Writing routines for handling errors

You can handle most error conditions that might occur while your program is running by using the ON EXCEPTION phrase, ON SIZE ERROR phrase, or other language constructs. But if an extraordinary condition such as a machine check occurs, usually your application is abnormally terminated.

Enterprise COBOL and Language Environment provide a way for a user-written program to gain control when such conditions occur. Using Language Environment condition handling, you can write your own error-handling routines in COBOL. They can report, analyze, or even fix up a program and enable it to resume running.

To have Language Environment pass control to a user-written error program, you must first identify and register its entry point to Language Environment. PROCEDURE-POINTER data items enable you to pass the entry address of procedure entry points to Language Environment services.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)