Nested procedures

Cataloged and in-stream procedures can invoke other procedures (up to 15 levels of nesting). In a procedure, an EXEC statement can invoke another procedure, which can contain an EXEC statement to invoke another procedure, and so on.

Note that an in-stream procedure cannot be defined within another procedure. The sequence PROC, PROC, PEND, PEND is not valid.