The ZATTACH command switches control from the current process to another process in the current job. Use ZATTACH to switch control from one subprocess to another subprocess. ZATTACH puts the current process into hibernation and connects the input stream to the process specified by the ZATTACH command.
The format of the ZATTACH command is:
ZAT[TACH][:tvexpr] [expr,...]
The optional truth-valued expression immediately following the command is a command postconditional that controls whether or not GT.M executes the command.
The optional expression specifies the name of a subprocess in the same VMS job to which the ZATTACH transfers control; the process name can be one (1) to 15 alphanumeric characters.
If ZATTACH has a list of arguments, each time control returns to this process, the command transfers control to the next argument in the list.
If ZATTACH has no argument or expr="", the command attaches to the original process for the VMS job; at least two (2) spaces must follow a ZATTACH with no argument to separate it from the next command on the line.
An indirection operator and an expression atom evaluating to a list of one or more ZATTACH arguments form a legal argument for a ZATTACH.
A run-time error occurs on an attempt to ZATTACH:
the current process
a process that is not part of the current job
a process that does not exist