Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


STACKSIZE

Use STACKSIZE to set the stack size of your program in bytes. The size must be an even number, from 0 to 0xFfffFffe. If you specify an odd number, it is rounded up to the next even number.

STACKSIZE statement syntax
Read syntax diagramSkip visual syntax diagram>>-STACKSIZE--reserve--+----------+----------------------------><
                       '- ,commit-'  
 
reserve
Indicates the total virtual address space reserved.
commit
Sets the amount of physical memory to allocate initially. When commit is less than reserve, memory demands are reduced, although execution time might be slower.

If your program generates a stack-overflow message, use the STACKSIZE statement to increase the size of the stack. If your program uses the stack very little, you can save some space by decreasing the stack size.

The STACKSIZE statement is equivalent to the /STACK linker option. If you specify both the statement and the option, the statement value overrides the option value.

The following example allocates 4 KB of local stack space:

STACKSIZE 4096

Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)