Perform Stack Overflow error

0 Likes

This article describes the Perform Stack Overflow error message and provides a resolution to the associated problem.

Problem:

During a program run, the error message Perform Stack Overflow occurred.

Resolution:

This error message normally indicates that an AcuCOBOL-GT program exceeded the number of levels PERFORM statements can be nested within paragraphs or sections. A PERFORM statement is nested if the statement contains a PERFORM statement against another paragraph/section. This error can occur if a PERFORM statement did not exit properly.

By default, the amount of nesting allowed by the runtime is set to 128. That is, 128 PERFORM againstg a paragraph/section that contains a PERFORM statement against another paragraph/section. This value can be increased by setting the runtime variable PERFORM_STACK to a higher value in the configuration file.

If a paragraph/section is not exited correctly, the perform stack will not clear down properly. Normally the end of a section is marked by the EXIT verb and the end of a paragraph is marked by another paragraph name (for example by a GO TO verb). If the program is not exiting a paragraph/section correctly, then the perform stack will not decrease.

Note: The -Zr compiler option allows for recursive PERFORM statements. When this option is used, the PERFORM verb is modified so that return addresses are stored on a stack. Only the most recent PERFORM statement has an active return address. When this option is used, a paragraph under the control of a PERFORM statement may (directly or indirectly) PERFORM itself. For more information, see your AcuCOBOL-GT user guides.

Incident Number: 2200357

			
			
			
			
Date:
 
Name:
 
Description of change: 
Date:
 
Name:
 
Description of change: 
			
Old KB# 14868
Comment List
Anonymous
Related Discussions
Recommended