Library /sys$common/syshlp/mailhelp.hlb  —  SPAWN
    Creates a subprocess of the current process. The context of the
    subprocess is copied from the current process. You can use the
    SPAWN command to leave Mail temporarily, perform other functions
    (such as displaying a directory listing or printing a file), and
    then return to Mail.

    Format

      SPAWN  [command]

1  –  Parameter

 command

    Specifies the DCL command string that executes in the context
    of the created subprocess. When the command completes, the
    subprocess terminates and control is returned to the parent
    process. If this parameter is not specified, a subprocess is
    created that transfers control to DCL command level.

2  –  Qualifiers

2.1    /INPUT

       /INPUT=file-spec

    Specifies an input file containing one or more DCL command
    strings to be executed by the spawned subprocess. If you specify
    a command string along with an input file, the command string is
    processed before the commands in the input file. Once processing
    is complete, the subprocess is terminated.

2.2    /LOGICAL_NAMES

       /LOGICAL_NAMES
       /NOLOGICAL_NAMES

    Specifies that the logical names of the parent process are to be
    copied to the subprocess. When you do not want the subprocess to
    use the logical names of the parent process, enter the qualifier
    /NOLOGICAL_NAMES. The default is /LOGICAL_NAMES.

2.3    /OUTPUT

       /OUTPUT=file-spec

    Identifies the output file to which the results of the SPAWN
    operation are written. Whenever you use the /NOWAIT qualifier,
    you should also use the /OUTPUT qualifier to specify a new
    output destination. Doing so prevents output from being displayed
    while you are specifying new commands. If you omit the /OUTPUT
    qualifier, output is written by default to the current SYS$OUTPUT
    device.

2.4    /PROCESS

       /PROCESS=subprocess-name

    Specifies the name of the subprocess to be created. The default
    name of the subprocess is USERNAME_n. If the subprocess name
    contains spaces or special characters, or is case-sensitive, then
    the subprocess name must be enclosed in quotation marks.

2.5    /SYMBOLS

       /SYMBOLS
       /NOSYMBOLS

    Determines whether the system passes DCL global and local symbols
    to the subprocess. The default is /SYMBOLS.

2.6    /WAIT

       /WAIT
       /NOWAIT

    Controls whether the system waits until the subprocess is
    completed before allowing more commands to be specified. The
    /NOWAIT qualifier allows you to specify new commands while the
    specified subprocess is running. If you specify /NOWAIT, you
    should also use the /OUTPUT qualifier to direct the output stream
    to a file, rather than displaying it on your terminal. Doing so
    prevents your terminal from being used by more than one process
    simultaneously.

3  –  Examples

    1.MAIL> SPAWN SHOW TIME

      This example shows how to create a subprocess that executes the
      DCL command SHOW TIME while you are using Mail.

    2.MAIL> SPAWN /NOLOGICAL_NAMES SET HOST
      _Node: MARS
         .
         .
         .
      $ LOGOUT
      CRAMMER logged out at ...

      %REM-S-END, control returned to node _BETA::

      MAIL>

      This example shows how to use the SPAWN command to create a
      subprocess in which you SET HOST to another node. When you want
      to leave node MARS and move back to node BETA, enter the DCL
      command LOGOUT. The /NOLOGICAL_NAMES qualifier prevents the
      logical names of the parent process from being copied to the
      subprocess.
Close Help