Introduction MTB Statements File System Compiler Applications Reference Guide Index

Language Structure Data Division I/O Format Division Procedure Division Mnemonics

Overview Variable Names Variable Types Variable Length Variable Classification Data Division Statements System Variables

ENTERLEVEL

System variable: ENTERLEVEL
Length/precision: 2.0
Description: The system variable named ENTERLEVEL is a two-digit numeric variable whose value equals the relative subprogram level of the program currently executing.
  • If ENTERLEVEL equals zero, the current program is not a subprogram (i.e., it was RUN, not ENTERed).

  • Values greater than zero equal the number of ENTER operations used to execute the current program.
For example, a value of 5 means than 5 ENTER operations were executed to run the current program (i.e., the current program is 5 subprogram levels deep).

See ENTER and EXIT for more information on subprograms.