Previous Topic: Extended Return Codes

Next Topic: REXX-defined Stacks

Program Stacks

A program stack, also known as an external data queue (EDQ), is created for each IMOD task. Stacks are maintained until the IMOD task has completed. Any data remaining on the stacks is discarded or returned to the caller.

Stacks are common to all programs called from an IMOD task and are accessible to ADDRESS environments. The SPAWN() function can pass the current stack (or a copy of it) to a newly created IMOD task.

A stack consists of a series of records that can contain data in any format. In ISERVE, the length of a single record cannot exceed 32,000 characters. The maximum number of records is determined by the amount of free memory in the ISERVE address space.

To prevent programming errors from seriously degrading ISERVE performance, each stack is limited in the amount of data it can contain. By default, an ISERVE stack can contain up to one megabyte (1,000 KB) of data. You can change the default value through the MAXSTACK initialization parameter. The maximum size of any stack can be controlled by the IMOD through the STACKINF() function.