Creates a subprocess, enabling you to execute DCL commands without terminating a debugging session or losing your debugging context. NOTE This command is not available in the VSI DECwindows Motif for OpenVMS user interface to the debugger. Format SPAWN [DCL-command]
1 – Parameters
DCL-command Specifies a DCL command which is then executed in a subprocess. Control is returned to the debugging session when the DCL command terminates. If you do not specify a DCL command, a subprocess is created and you can then enter DCL commands. Either logging out of the spawned process or attaching to the parent process (with the DCL command ATTACH) returns you to your debugging session. If the DCL command contains a semicolon, you must enclose the command in quotation marks ("). Otherwise the semicolon is interpreted as a debugger command separator. To include a quotation mark in the string, enter two consecutive quotation marks ("").
2 – Qualifiers
2.1 /INPUT
/INPUT=file-spec Specifies an input DCL command procedure containing one or more DCL commands to be executed by the spawned subprocess. The default file type is .COM. If you specify a DCL command string with the SPAWN command and an input file with /INPUT, the command string is processed before the input file. After processing of the input file is complete, the subprocess is terminated. Do not use the asterisk (*) wildcard character in the file specification.
2.2 /OUTPUT
/OUTPUT=file-spec Writes the output from the SPAWN operation to the specified file. The default file type is .LOG. Do not use the asterisk (*) wildcard character in the file specification.
2.3 /WAIT
/WAIT (default) /NOWAIT Controls whether the debugging session (the parent process) is suspended while the subprocess is running. The /WAIT qualifier (default) suspends the debugging session until the subprocess is terminated. You cannot enter debugger commands until control returns to the parent process. The /NOWAIT qualifier executes the subprocess in parallel with the debugging session. You can enter debugger commands while the subprocess is running. If you use /NOWAIT, you should specify a DCL command with the SPAWN command; the DCL command is then executed in the subprocess. A message indicates when the spawned subprocess completes. The kept debugger (that is, the debugger invoked with the DCL command DEBUG/KEEP) shares I/O channels with the parent process when it is run by a SPAWN/NOWAIT command. Therefore, in the VSI DECwindows Motif for OpenVMS user interface, you must press the Return key twice on the DECterm from which the debugger was run after the debugger version number has appeared in the command view. Optionally, you can execute the kept debugger in the following manner: $ DEFINE DBG$INPUT NL: $ SPAWN/NOWAIT RUN DEBUG/KEEP
3 – Description
The SPAWN command acts exactly like the DCL command SPAWN. You can edit files, compile programs, read mail, and so on without ending your debugging session or losing your current debugging context. In addition, you can spawn a DCL command SPAWN. DCL processes the second SPAWN command, including any qualifier specified with that command. Related command: ATTACH
4 – Examples
1.DBG> SPAWN $ This example shows that the SPAWN command, without a parameter, creates a subprocess at DCL level. You can now enter DCL commands. Log out to return to the debugger prompt. 2.DBG> SPAWN/NOWAIT/INPUT=READ_NOTES/OUTPUT=0428NOTES This command creates a subprocess that is executed in parallel with the debugging session. This subprocess executes the DCL command procedure READ_NOTES.COM. The output from the spawned operation is written to the file 0428NOTES.LOG. 3.DBG> SPAWN/NOWAIT SPAWN/OUT=MYCOM.LOG @MYCOM This command creates a subprocess that is executed in parallel with the debugging session. This subprocess creates another subprocess to execute the DCL command procedure MYCOM.COM. The output from that operation is written to the file MYCOM.LOG.