Previous Topic: Issue Commands

Next Topic: Start REXX Programs from OCS


Execute or Start NCL Processes from OCS

There is an NCL processing environment for each window of your terminal that allows commands and NCL processes to execute on behalf of that window.

When you use an EXEC or START command to invoke an NCL process, the NCL process executes in the NCL processing environment for the OCS window.

Note: If you enter the EXEC or START command incorrectly, the system attempts to execute the command as if it were an NCL process.

Any NCL process can have a dependent processing environment that lets it issue commands or execute other NCL processes independently using the &INTCMD statement. NCL procedures can also use ROF sessions to collect information from other systems.

Execute NCL Processes Serially

An OCS window can execute a serial stream of NCL processes so that they are invoked one after the other. Serial execution is suitable for processes with a short duration.

To execute NCL processes serially, use the EXEC command.

Processes invoked by the EXEC command can issue the &PAUSE statement to wait for further input from the OCS window. The GO, END, FLUSH, and INTQ commands, together with the process’s unique identifier, let you communicate with the process.

Example: Execute Processes in Sequence

To execute PROC1 and PROC2 in sequence, enter the following commands:

EXEC PROC1
EXEC PROC2

Your OCS window places the two processes in an EXEC queue, which are executed on a first-come, first-served basis. Process PROC1 is scheduled for immediate execution and process PROC2 is queued to execute after PROC1 ends.

Execute NCL Processes Concurrently

An OCS window can execute NCL processes in parallel at the same time.

To execute NCL processes concurrently, use the START command. If you enter the name of an NCL procedure by itself, the START command is implied.

Any started procedure can issue an &PAUSE statement to wait for further input from GO, END, and FLUSH commands from the OCS window. These commands, together with the unique identifier for the process, let you communicate with the process explicitly.

Example: Execute NCL Processes Concurrently

To execute PROC1 and PROC2 at the same time, enter the following commands:

START PROC1
START PROC2

Advantages of Started Procedures

Using the START command to invoke NCL processes has the following advantages: