Previous Topic: Dependent Processing Environment

Next Topic: Explicit NCL Process Execution

&INTCMD Verb

&INTCMD lets a procedure issue commands or execute other NCL processes and have the results returned to it rather than returning to the user's terminal window. This lets users write sophisticated procedures that check the results of their actions and correlate commands with their results.

When an &INTCMD statement is executed by a procedure, a new NCL processing environment is created that is subordinate to the process that owns it, that is, the process from which the &INTCMD statement is issued. This new processing environment is called a dependent processing environment, because it exists only until its originating process ends or issues an &INTCLEAR verb. The originating process can use &INTCMD to schedule commands or other NCL processes for execution within its dependent processing environment.

Any NCL process can issue &INTCMD and create its own dependent processing environment. As described before, if you issue the commands:

START    PROC1
START    PROC2

from your OCS window command line, processes PROC1 and PROC2 start executing in your window's NCL processing environment.

If each of those processes issues:

&INTCMD  START  PROC3

then PROC1 and PROC2 each have a dependent processing environment in which a process PROC3 is executing. Similarly, the PROC3 processes can issue their own &INTCMD statements to create and use their own dependent environments.

Any process that ends or that issues an &INTCLEAR statement, automatically causes the termination of all dependent environments, and therefore causes termination of whatever hierarchy of processes exists below it.