With VisualAge COBOL Version 3.0.3 (and later), when the IBM Distributed Debugger gains control after COBOL detects a severe or critical error, you can optionally fix the error and resume running the program.
This enhancement does not affect debugging capabilities or results in the following cases:
Execution errors are reported to VisualAge COBOL in these two ways:
Windows operating system exceptions are used for errors that the hardware or the operating system detects. Such errors can occur while applications are running in or outside the VisualAge COBOL run time. Software notifications can occur when validity and consistency checks within the run time detect the error.
To resume running a program (when running outside the VisualAge COBOL run time) after a hardware or system error, do the following steps:
To resume running a program following an error, while the VisualAge COBOL run time is running, the run-time exception handler must gain control. For software-detected errors, the run-time exception handler gains control by default. For hardware or system errors that occur when the debugger's exception filters are set to intercept exceptions, use the run exception debugger option to enable the run-time exception handler.
When the VisualAge COBOL run-time exception handler gains control, the debugger displays a run-time error message that corresponds to the exception. (The debugger reports these messages as run-time detected errors.) After you close the message window, the debugger stops at the instruction following the call to the VisualAge COBOL run-time routine that caused the error. To determine the precise location where the application stopped, use either the mixed or assembly view in the debugger.
Errors vary widely. You can ignore some errors and restart an application without making a change. Other errors can be so serious that the application cannot profitably be resumed. However, to correct an error for a simple case, you might be able to take the following action:
In more complicated cases, you can:
In all cases, be aware that after the debugger gains control in an application, the COBOL statements before the point where the debugger stopped might not have completed. Also, after you restart an application following an error, the application might not run the same as it would if no error had occurred.