MAIL SPAWN — MicroVMS 4.5B
Creates a subprocess of the current process. The context of the
subprocess is copied from the current process. You can use the
SPAWN command to leave MAIL temporarily, perform other functions
(such as displaying a directory listing or printing a file), and
then return to MAIL.
Format:
SPAWN [command]
Additional information available:
Parameters
command Specifies the DCL command string that executes in the context of the created subprocess. When the command completes, the subprocess terminates and control is returned to the parent process. If not specified, a subprocess is created transferring control to the DCL command level.
Qualifiers
Additional information available:
/INPUT/LOGICAL_NAMES/OUTPUT/PROCESS/WAIT
/INPUT
/INPUT=file-spec Specifies an input file containing one or more DCL command strings to be executed by the spawned subprocess. If you specify a command string along with an input file, the command string is processed before the commands in the input file. Once processing is complete, the subprocess is terminated.
/LOGICAL_NAMES
/LOGICAL_NAMES Specifies that the logical names of the parent process be copied to the subprocess. When you do not want the subprocess to use the logical names of the parent process, enter the qualifier /NOLOGICAL_NAMES. The default is /LOGICAL_NAMES.
/OUTPUT
/OUTPUT=file-spec Identifies the output file to which the results of the SPAWN operation are written. You should specify an output other than SYS$OUTPUT whenever you specify /NOWAIT to prevent output from being displayed while you are specifying new commands. If you omit the /OUTPUT qualifier, output is written to the current SYS$OUTPUT device.
/PROCESS
/PROCESS=subprocess-name Specifies the name of the subprocess to be created. The default name of the subprocess is USERNAME_n.
/WAIT
/WAIT Controls whether the system waits until the subprocess is completed before allowing more commands to be specified. The /NOWAIT qualifier allows you to specify new commands while the specified subprocess is running. If you specify /NOWAIT, you should also use /OUTPUT to direct the output to a file rather than displaying it on the screen to prevent your terminal from being used by more than one process simultaneously.
Examples
1.
MAIL> SPAWN SHOW TIME
This example shows how to create a subprocess containing the DCL
command SHOW TIME while you are in MAIL.
2.
MAIL> SPAWN /NOLOGICAL_NAMES SET HOST
_Node: MARS
.
.
.
$ LOGOUT
CRAMMER logged out at ...
%REM-S-END, control returned to node _BETA::
MAIL>
This example shows how to use the SPAWN command to create a
subprocess in which you SET HOST to another node. When you want to
leave node MARS and move back to node BETA, enter the LOGOUT
command. The /NOLOGICAL_NAMES qualifier prevents the logical names
of the parent process from being copied to the subprocess.