The enclave boundary defines whether a routine is a main routine or a subroutine. The first routine to run in the enclave is known as the main routine in Language Environment. All others are designated subroutines of the main routine.
The first routine invoked in the enclave must be capable of being designated main according to the rules of the language of the routine. For example, a main routine in a Language Environment-conforming PL/I application would be the PROC OPTIONS (MAIN) routine. All other routines invoked in the enclave must be capable of being a subroutine according to the rules of the languages of the routines.
If a routine is capable of being invoked as either a main or subroutine, and recursive invocations are allowed according to the rules of the language, the routine can be invoked multiple times within the enclave. The first of these invocations could be as a main routine and the others as subroutines.