Declare Processing Options (DCLPRCOPT)

Where allowed to run:
  • Batch program (*BPGM)
  • Interactive program (*IPGM)
Threadsafe: Yes
Parameters
Examples
Error messages

The Declare Processing Options (DCLPRCOPT) command lets you define compiler processing options.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
SUBRSTACK Subroutine stack depth 20-9999, 99 Optional, Positional 1
Top

Subroutine stack depth (SUBRSTACK)

Specifies how many entries you want to allow on the subroutine stack. Each time a CALLSUBR (Call Subroutine) command is run, an entry is added on the subroutine stack. The entry is removed when a RTNSUBR (Return from Subroutine) or ENDSUBR (End Subroutine) command is run. The subroutine stack can have multiple entries when CALLSUBR commands are run from within a subroutine; a subroutine can invoke another subroutine or recursively invoke itself.

99
The maximum number of subroutine stack entries allowed when this CL program is run is 99.
20-9999
Specify the maximum number of subroutine stack entries allowed when this CL program is run.
Top

Examples

DCLPRCOPT    SUBRSTACK(50)

This command sets the maximum number of subroutine stack entries to 50. When the CL program is run, if the subroutine stack depth exceeds 50, escape message CPF0822 will be sent.

Top

Error messages

None

Top