RECURSECHECK

Turns on checking for recursion in generated code.
Note: This directive is supported for native COBOL only.

Syntax:

>>-.---.-.----.--RECURSECHECK------------------><
   +-/-+ +-NO-+

Parameters:

None

Properties:

Default: See Comments.
Phase: Generate
$SET: Initial

Comments:

Programs that are compiled reentrant, or are marked recursive by having a local-storage section, always set NORECURSECHECK. Otherwise, unless explicitly set by [NO]CHECK or [NO]RECURSECHECK, this directive defaults to RECURSECHECK for programs generated for debug, and NORECURSECHECK otherwise.

When this directive is turned on, recursion will generate a COBRT166 Recursive COBOL CALL is illegal error at run-time.