RUN-TIME ERRORS - IBM Mainframe

The compiler can detect some errors. Others, however, will not be apparent until you actually run your program. As you test your program, there are several ways in which you might become aware of a possible problem.

Prolonged Run Time (Loops and Waits)

If your program appears to be taking an unusually long time to complete its execution, it may be caught in a loop or a wait. Sometimes repetitious output (or the absence of expected output) will provide an early clue. A loop in this sense is a series of instructions repeated continuously because erroneous program logic allows for no exit. If there are only one or two possible locations for loops in your program, you can probably track down the error by desk-checking your source program.

Incorrect Execution Results

Your program may run to its conclusion without interruption, but examination of its output may show that something is wrong. Even though you did not get any error messages, the program is not producing the expected results. If this happens, it is a condition that only you, as the program's designer, can detect. Incorrect output can result from many possible causes.

Premature Termination of Your Program

If COBOL detects an error condition while your program is running and, if it is not one of the conditions that is handled by such things as a USE AFTER ERROR declarative, an ON OVERFLOW clause, or a status key check, COBOL will usually print an error message and terminate your program. Messages may also be issued by other components of your execution environment.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics