Schedules a command for execution in the issuing process's dependent processing environment.
&INTCMD command text
Executes a command in an NCL process's dependent processing environment and returns command results to the procedure for analysis.
Every NCL process has a dependent processing environment associated with it where it can execute commands or other NCL processes. &INTCMD is used to execute commands and processes in this dependent environment.
When an &INTCMD statement is processed, the command statement is executed in the issuing process's dependent processing environment. The command is processed in the normal manner, but all responses resulting from the command are returned to the originating process's dependent response queue, and not the user's terminal. The issuing process can then use the &INTREAD statement to retrieve queued responses one by one.
The result is a procedure that can correlate the results of commands it issues to react intelligently to the results of the command.
The process &INTCMD invokes, executes independently of the initiating procedure. If the initiating process ends before the dependent process has completed, the dependent process is flushed automatically. It is your responsibility to ensure that the initiating procedure synchronizes with the &INTCMD process by using &INTREAD statements issued in the initiating process.
Operands:
Any upper and lower case command text.
Examples: &INTCMD
&INTCMD D TERM1 &INTCMD D NCPSTOR,ID=NCP1,LEN=4,ADDR=&1 &INTCMD MAISEND IMS /DIS A &INTCMD START MONITOR &INTCMD PROFILE MONMSG=Y
Notes:
Certain product commands do not apply when executed within an &INTCMD environment, and return the message:
N10104 COMMAND CANNOT BE SOURCED FROM &INTCMD STATEMENT.
These commands include the CLEAR, K, PAGE, END, FLUSH, GO, SPLIT, SWAP, and FSPROC.
If another NCL process is invoked by an &INTCMD statement (for example, &INTCMD START PROCNAME), the started process executes in the originating process's dependent processing environment as a dependent process.
MAI-OC command results issued from an &INTCMD statement are returned to your dependent response queue and is accessed by &INTREAD statements. However, if the dependent processing environment is removed (by using &INTCLEAR, or by terminating the procedure) from an OCS primary processing environment, the MAI-OC session is retained and further output is delivered to the OCS display. NCL processes invoked with &INTCMD (that is, executing in the originating process's dependent processing environment) have their own dependent processing environments. These procedures can therefore use &INTCMD without restriction to execute their own commands and dependent processes. If the highest level process terminates, all of its dependent levels terminate.
The NCL process can use &INTCMD PROFILE commands to control the behavior of the dependent environment, much the same way as an OCS operator. For example, &INTCMD PROFILE MONMSG=Y is used to receive monitor class messages on the dependent environments response queue.
Using internal command environments is not limited to standard procedures. &INTCMD is used within reserved procedures such as PPOPROC and MSGPROC, or from within the NMINIT and NMREADY procedures executed during system initialization.
Commands executed using &INTCMD are not echoed to your terminal; nor are the results of the commands - these are queued for processing by &INTREAD. However, all command results processed with &INTREAD are logged (by default) to the activity log to provide an audit trail of events. The messages appear in the log with *nclid* in the log's node name column. (The &CONTROL NOINTLOG statement is used to suppress logging of these messages to the activity log.)
The &INTCLEAR statement is used to flush any messages queued for &INTREAD processing. For example, when VTAM command responses arrive much later after the recipient's details have been removed by an &INTCLEAR statement. The message is directed to the activity log regardless of the setting of the &CONTROL statement. This also occurs if a procedure terminates before the messages or responses which it initiates, return.
Note: For more information about NCL execution, processing regions, and environments see the Network Control Language Programming Guide.
| Copyright © 2009 CA. All rights reserved. |
|