Previous | Contents | Index |
Create a subprocess.
SPAWN [command]
Qualifiers Defaults /INPUT=in-file-spec None /LOGICAL_NAMES /LOGICAL_NAMES /OUTPUT=out-file-spec None /PROCESS=name None /SYMBOLS /SYMBOLS /WAIT /WAIT
Cannot be used from a captive account.
command
Optional parameter specifying the command string for the subprocess to execute. After the command completes, the subprocess terminates and control is returned to the parent process.
The
SPAWN
command can be used to either issue a single DCL command from within PMDFQM
or to leave PMDFQM
temporarily, do other work (e.g., type out a file, generate a directory listing, etc.), and then return to PMDFQM
.By default, the context of the current process is copied to the subprocess. This behavior can be controlled with the
/LOGICAL_NAMES
and/SYMBOLS
qualifiers.
/INPUT=in-file-spec
Specifies an input command file from which the subprocess is to draw command input. Once command processing is completed, the subprocess terminates. When you specify both a command string and input file, then the command string is first processed and then the commands from the input file./LOGICAL_NAMES (default)
/NOLOGICAL_NAMES
The/LOGICAL_NAMES
qualifier specifies that the logical names of the parent process are to be copied to the subprocess. This is the default behavior. Specify/NOLOGICAL_NAMES
to prevent the subprocess from inheriting the logical name definitions of its parent./OUTPUT=out-file-spec
Specifies the output file to which the output of the subprocess is to be directed. If the/OUTPUT
qualifier is omitted, then subprocess output is directed to the current SYS$OUTPUT device (generally, your terminal)./PROCESS=name
Specifies the process name to associate with the subprocess. If not specified, a default name of the form USERNAME_n, where "USERNAME" is your username, is used./SYMBOLS (default)
/NOSYMBOLS
The/SYMBOLS
qualifier specifies that the DCL symbol definitions of the parent process are to be copied to the subprocess. This is the default behavior. Specify/NOSYMBOLS
to prevent the subprocess from inheriting the symbol definitions of its parent./WAIT (default)
/NOWAIT
By default, your current (parent) process will wait until the subprocess has finished its processing and terminated. This default behavior is explicitly selected with the/WAIT
qualifier. The/NOWAIT
qualifier allows you to continue working from your current process while the subprocess is running. When you specify/NOWAIT
, you should also specify the/OUTPUT
qualifier so as to prevent the subprocess output from appearing on your terminal screen.
#1 |
---|
qm.user> SPAWN DIRECTORY/SIZE=ALL A.TXT Directory D1:[BOB] A.TXT;10 125/126 A.TXT;9 124/126 A.TXT;8 124/126 Total of 3 files, 373/378. qm.user> SPAWN PURGE/LOG A.TXT %PURGE-I-FILPURG, D1:[BOB]A.TXT;9 deleted (126 blocks) %PURGE-I-FILPURG, D1:[BOB]A.TXT;8 deleted (126 blocks) %PURGE-I-TOTAL, 2 files deleted (252 blocks) qm.user> |
In this example, the
SPAWN
command is used to obtain a directory listing of the filesA.TXT
, and then to purge back old versions of that file. The ability to do this is useful when you find that you have insufficient disk quota to create and edit a mail message you want to send.
#2 |
---|
qm.user> SPAWN . . . $ LOGOUT Process BOB_1 logged out at 23-AUG-2012 12:12:51.42 qm.user> |
In this example a
SPAWN
command with no command string is issued. This places you into the subprocess where you can issue DCL commands and perform other processing. When you are done with the subprocess and ready to return to PMDFQM
, use theLOGOUT
orEOJ
command.
Previous | Next | Contents | Index |