PMDF User's Guide
OpenVMS Edition


Previous Contents Index


SPAWN

Create a subprocess.

Syntax

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

restrictions

Cannot be used from a captive account.

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.

Description

The SPAWN command can 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 can be controlled with the /LOGICAL_NAMES and /SYMBOLS qualifiers.


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.

EXAMPLES

#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 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.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 PMDF QM , use the LOGOUT or EOJ command.


Previous Next Contents Index