/sys$common/syshlp/CTF$HELP.HLB  —  SPAWN
 The SPAWN command creates a sub-process of the current process.

 Format:

 	SPAWN [/qualifiers] [command-string]

1  –  Parameters

 The command has the following optional parameter.

 command-string

 	Specifies a command string of up to 131 characters that is to
 	be executed in the context of the created sub-process.

 	When the command completes, the sub-process terminates and
 	control returns to the parent process.

 	If you do not specify a command string, a sub-process is
 	created and remains until you log out.

2  –  Command qualifiers

 The command has the following qualifiers:

  /INPUT   /LOGICAL_NAMES   /OUTPUT   /PROCESS_NAME   /PROMPT
  /SYMBOLS /WAIT

3    /INPUT

  /INPUT=file-spec

 	Specifies an input file that contains one or more DCL
 	commands to be executed by the spawned sub-process.
 	Once processing of the input file is complete, the sub-process
 	is terminated.

 	If both the command-string parameter and the /INPUT qualifier
 	are specified, the command string is executed before the DCL
 	commands in the file specified by the /INPUT qualifier.

4    /LOGICAL_NAMES

  /LOGICAL_NAMES
  /NOLOGICAL_NAMES

 	Specifies whether process logical names and logical name
 	tables are to be copied to the spawned sub-process.

 	The default is LOGICAL_NAMES.

5    /OUTPUT

  /OUTPUT=file-spec

 	Specifies the name of the output file to which the spawned
 	sub-process writes its output.

 	The default is SYS$OUTPUT.

6    /PROCESS_NAME

  /PROCESS_NAME=subprocess-name

 	Specifies the name of the sub-process to be created.

 	By default, a unique process name is assigned with the same
 	base name as the parent process and a unique number.

7    /PROMPT

  /PROMPT=string

 	Specifies the prompt for DCL to use within the sub-process.

 	By default, SPAWN copies the current prompt from the parent
 	process.

8    /SYMBOLS

  /SYMBOLS
  /NOSYMBOLS

 	Specifies whether the system passes DCL global and local
 	symbols to the sub-process.

 	The default is /SYMBOLS.

9    /WAIT

  /WAIT
  /NOWAIT

 	Specifies whether the system waits until the current
 	sub-process is completed before allowing more commands to be
 	issued by the parent process.

 	The default is /WAIT.

10  –  Examples

 CTF> SPAWN "SHOW SYSTEM"

 	Spawns a sub-process in which a SHOW SYSTEM command is
 	executed, after which control returns to the parent process.

 CTF> SPAWN /INPUT=CMDS.COM

 	Spawns a sub-process and executes the DCL commands in
 	CMDS.COM, after which control returns to the parent process.

 CTF> SPAWN /INPUT=CMDS.COM/OUTPUT=CMDS_OUT.LIS/NOWAIT

 	Also executes the DCL commands in CMDS.COM, but returns
 	control immediately to the parent process without waiting for
 	the spawned sub-process to complete. Any output produced by
 	the sub-process is written to CMDS_OUT.LIS.
Close Help