SYSMANHELP.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 SYSMAN temporarily, perform other tasks
    (such as displaying a directory listing or printing a file), and
    return to SYSMAN.

    Note that SPAWN performs actions on the local node only. If you
    want to execute DCL commands or command procedures throughout
    your environment, use the DO command.

    Requires TMPMBX or PRMMBX user privilege. The SPAWN command does
    not manage terminal characteristics. You cannot use the SPAWN and
    ATTACH commands if your terminal has an associated mailbox.

    Format

      SPAWN  [command-string]

1  –  Parameter

 command-string

    Specifies a command string of fewer than 132 characters that
    you want executed in the context of the created subprocess.
    When the command completes execution, the subprocess terminates
    and control returns to the parent process. If you specify both
    a command string and the /INPUT qualifier, the command string
    executes before additional commands are obtained from the /INPUT
    qualifier.

2  –  Qualifiers

2.1    /INPUT

       /INPUT=filespec

    Specifies an input file containing one or more DCL command
    strings that you want executed by the spawned subprocess. If you
    specify a command string along with an input file, the command
    string gets processed before the commands in the input file. When
    processing is complete, the subprocess terminates.

2.2    /LOGICAL_NAMES

       /LOGICAL_NAMES (default)
       /NOLOGICAL_NAMES

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

2.3    /OUTPUT

       /OUTPUT=filespec

    Identifies the output file to which the results of the operation
    are written. Specify an output other than SYS$OUTPUT whenever
    you use the /NOWAIT qualifier. This prevents output from being
    displayed while you are specifying new commands. If you omit the
    /OUTPUT qualifier, output gets written to the current SYS$OUTPUT
    device.

2.4    /PROCESS

       /PROCESS=subprocess-name

    Specifies the name of the subprocess that you want to create. The
    default subprocess name is in the format USERNAME_n.

2.5    /SYMBOLS

       /SYMBOLS (default)
       /NOSYMBOLS

    Determines whether the system passes DCL global and local symbols
    to the subprocess.

2.6    /WAIT

       /WAIT (default)
       /NOWAIT

    Controls whether the system waits until the subprocess completes
    before you can specify more commands. The /NOWAIT qualifier
    enables you to specify new commands while the specified
    subprocess is running. If you specify the /NOWAIT qualifier,
    use the /OUTPUT qualifier to direct the output to a file instead
    of displaying it on the screen. Doing this prevents your terminal
    from being used by more than one process simultaneously.

3  –  Examples

    1.SYSMAN> SPAWN DIR SYS$MANAGER:SITE*.*

      Directory CLU$COMMON:[SYSMGR]

      SITE$STARTUP.COM;5

      Total of 1 file.

      SYSMAN>

      This command enables you to enter the DIRECTORY command in DCL
      to see if a site-specific startup file is in the directory.
      After the DIRECTORY command executes, control returns to the
      parent process.

    2.SYSMAN> SPAWN
      $ EDIT SITE$STARTUP.COM
         .
         .
         .
      $ LOGOUT
      Process SYSTEM_1 logged out at 28-JUN-2002 10:05:17.24
      SYSMAN>

      This example shows how you can use the SPAWN command to leave
      SYSMAN and edit a file. The LOGOUT command returns you to
      SYSMAN.

    3.SYSMAN> SPAWN /NOLOGICAL_NAMES SET HOST
      _Node: NODE21
         .
         .
         .
      $ LOGOUT

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

      SPAWN>

      This example shows how you can use the SPAWN command to create
      a subprocess in which you can use the SET HOST command. When
      you want to leave NODE21, enter the LOGOUT command. The
      /NOLOGICAL_NAMES qualifier prevents the logical names of the
      parent process from being copied to the subprocess.
Close Help