MCR SYSMAN SPAWN — VMS 5.4-3
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 SYSMAN temporarily, perform other tasks
(such as displaying a directory listing or printing a file), and
return to SYSMAN.
Note that SPAWN performs actions on the local node only. If you
want to execute DCL commands or command procedures throughout your
environment, use the DO command.
Requires TMPMBX or PRMMBX user privilege. The SPAWN command does
not manage terminal characteristics. The SPAWN and ATTACH commands
cannot be used if your terminal has an associated mailbox.
Format
SPAWN [command-string]
Additional information available:
Parameter
command-string Specifies a command string of fewer than 132 characters that you want executed in the context of the created subprocess. When the command completes execution, the subprocess terminates and control returns to the parent process. If both a command string and the /INPUT qualifier are specified, the specified command string executes before additional commands are obtained from the /INPUT qualifier.
Qualifiers
Additional information available:
/INPUT/LOGICAL_NAMES/OUTPUT/PROCESS/SYMBOLS/WAIT
/INPUT
/INPUT=filespec
Specifies an input file containing one or more DCL command strings
that you want executed by the spawned subprocess. If you specify a
command string along with an input file, the command string gets
processed before the commands in the input file. When processing
is complete, the subprocess terminates.
/LOGICAL_NAMES
/LOGICAL_NAMES (default)
/NOLOGICAL_NAMES
Specifies that the logical names of the parent process are copied
to the subprocess. When you do not want the subprocess to use the
logical names of the parent process, enter the /NOLOGICAL_NAMES
qualifier.
/OUTPUT
/OUTPUT=filespec
Identifies the output file to which the results of the operation
are written. You should specify an output other than SYS$OUTPUT
whenever you use the /NOWAIT qualifier. This prevents output from
being displayed while you are specifying new commands. If you
omit the /OUTPUT qualifier, output gets written to the current
SYS$OUTPUT device.
/PROCESS
/PROCESS=subprocess-name
Specifies the name of the subprocess that you want to create. The
default subprocess name is in the format USERNAME_n.
/SYMBOLS
/SYMBOLS (default)
/NOSYMBOLS
Determines whether the system passes DCL global and local symbols
to the subprocess.
/WAIT
/WAIT
/NOWAIT
Controls whether the system waits until the subprocess completes
before allowing you to specify more commands. The /NOWAIT
qualifier allows you to specify new commands while the specified
subprocess is running. If you specify the /NOWAIT qualifier,
you should also use the /OUTPUT qualifier to direct the output
to a file rather than displaying it on the screen. Doing this
prevents your terminal from being used by more than one process
simultaneously.
Example
SYSMAN> SPAWN DIR SYSTARTUP_V5.*
Directory SYS$COMMON:[SYSMGR]
SYSTARTUP_V5.COM;1 SYSTARTUP_V5.TEMPLATE;1
Total of 2 files.
SYSMAN>
The SPAWN command in this example allows you to view a
directory listing of some files in the SYS$MANAGER directory.
After the DIRECTORY command executes, control returns to the
parent process.
SYSMAN> SPAWN
$ EDIT SYSTARTUP_V5.COM
.
.
.
$ LOGOUT
Process SYSTEM_1 logged out at 28-JUN-1990 10:05:17.24
SYSMAN>
This example shows how you can use the SPAWN command to leave
SYSMAN and edit a file. The LOGOUT command returns you to
SYSMAN.
SYSMAN> SPAWN /NOLOGICAL_NAMES SET HOST
_Node: DUNBAR
.
.
.
$ LOGOUT
%REM-S-END, control returned to node _NEWT::
SPAWN>
The example shows how you can use the SPAWN command to create
a subprocess in which you can SET HOST. When you want to leave
node DUNBAR, enter the LOGOUT command. The /NOLOGICAL_NAMES
qualifier prevents the logical names of the parent process from
being copied to the subprocess.