Create a subprocess. Syntax SPAWN [command] Command Qualifiers Defaults /INPUT=in-file-spec None /LOGICAL_NAMES /LOGICAL_NAMES /OUTPUT=out-file-spec None /PROCESS=name None /SYMBOLS /SYMBOLS /WAIT /WAIT
1 – Restrictions
Cannot be used from a captive account.
2 – Parameters
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.
3 – Description
The SPAWN command may be used to either issue a single DCL command from within PMDF QM or to leave PMDF QM temporarily, do other work (e.g., type out a file, generate a directory listing, etc.), and then return to PMDF QM. By default, the context of the current process is copied to the subprocess. This behavior may be controlled with the /LOGICAL_ NAMES and /SYMBOLS qualifiers.
4 – Qualifiers
4.1 /INPUT
/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.
4.2 /LOGICAL_NAMES
/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.
4.3 /OUTPUT
/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).
4.4 /PROCESS
/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.
4.5 /SYMBOLS
/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.
4.6 /WAIT
/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.
5 – Examples
1.qm.maint> 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.maint> 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.maint> In this example, the SPAWN command is used to obtain a directory listing of the files A.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.maint> SPAWN . . . $ LOGOUT Process BOB_1 logged out at 15-NOV-2012 12:12:51.42 qm.maint> 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 PMDF QM, use the LOGOUT or EOJ command.