COBOL Manual for TNS/E Programs (H06.03+)
Run-Time Diagnostic Messages
HP COBOL Manual for TNS/E Programs—520347-003
48-5
Stack Overflow
•
With the Debugger
If the PARAM INSPECT ON command is active, the process stops and enters the
selected debugger . You can use the debugger to find the problem. If the selected
debugger is symbolic, using it is easier if you compiled the program with the
SYMBOLS directive. If you did not, you might have to recompile the program with
SYMBOLS to find the problem with the debugger.
•
With a Saveabend File
If the program is compiled with the SAVEABEND directive, the process generates
a saveabend file if it terminates abnormally. You can determine the cause of the
problem by examining the saveabend file.
Stack Overflow
Stack overflow means that the control and data stack has overflowed.
The most likely cause of stack overflow is calling one or more initial programs that
have large amounts of data declared in the Working-Storage Section or Extended-
Storage Section. Data in initial programs is allocated on the stack, and the area of
memory reserved for the stack is much smaller than the area reserved for static data.
There are several ways to fix this problem:
•
Move one or more large data items (such as large tables) from the initial program
to a noninitial program that calls it, and pass the data items as parameters.
•
Reduce arrays to fewer elements.
•
Eliminate unused data items.
•
Remove the INITIAL phrase from the program header and explicitly cancel the
program after every call to it (see CANCEL).
How to Use the Message List
This topic lists and explains all the run-time diagnostic messages that can be reported
for an HP COBOL program that does not call any non-COBOL routines.
If your HP COBOL program calls non-COBOL routines, errors in those routines can
cause additional messages to be reported. For a complete list of CRE run-time
diagnostic messages, see the CRE Programmer’s Guide.
The messages in Message List are in numeric order by message number.










