Both the DSLINE and REMOTE
commands can be executed within a program using the COMMAND
intrinsic. You can set up environment attributes, log on remote
sessions, and issue remote commands from within a program. For the
format of the COMMAND intrinsic,
refer to the MPE/iX Intrinsics Reference Manual.
NS 3000/iX maintains separate default environments
for each process within a job or session. A DSLINE
or REMOTE command that explicitly specifies an
environment ID must be issued from the process to set up its default
environment. Subsequent DSLINE or REMOTE
commands issued from the process may then use (or change) the process
default environment. For example, suppose an application has two
processes that set up remote sessions on different nodes. These
processes could execute the following command sequences using the
COMMAND intrinsic:
Process 1
DSLINE NODE1 {sets default environment for process 1} REMOTE HELLO USER1.ACCT1 {uses default environment NODE1}
|
Process 2
DSLINE NODE2 {sets default environment for process 2} REMOTE HELLO USER2.ACCT2 {uses default environment NODE2}
|
Because NS 3000/iX maintains separate default environments
for each of these processes, they can execute concurrently with
no problems of confusion between the default environments.
DSLINE commands for the same environment
can be issued from several different processes within a job or session.
Attributes defined by the DSLINE commands take
effect for all processes within the job or session. For example,
if a DSLINE from one process specifies
the COMP option, the COMP
attribute is set for all processes using the environment.
NS 3000/iX keeps track of each process that issues
a DSLINE command for an environment. The environment
will not be deleted until all the processes have issued DSLINE;CLOSE
commands. If any process terminates without issuing the DSLINE;CLOSE,
one will be implicitly performed for the environment.
Only environments defined by DSLINE or
REMOTE commands within a process will be displayed
by generic DSLINE commands. For example, if you
issue a DSLINE @;SHOW command from a process,
only those environments defined within the process will be displayed.
Several processes within a job or session can issue REMOTE
commands to the same remote session. However, this practice is not
advised, since the commands will be unpredictably interleaved depending
on the order of execution of the processes. Also, if one process
is already executing a REMOTE command to a remote
session, a REMOTE command to the same remote
session from another process will fail.
Concurrent execution of REMOTE commands
by multiple processes within the same job or session is not supported.
This applies whether the processes are communicating with the same
or different remote sessions. One process should complete execution
of the REMOTE command and return to local mode
before a second process attempts execution of a REMOTE
command.