Example:
$ SPAWN
$ GTM
GTM>ZAT
$ SHOW PROCESS/SUB
...
There are 2 processes in this job:
KEANE (*)
KEANE1
This demonstrates an argumentless ZATTACH to the master process. The DCL command SHOW PROCESS /SUB displays the subprocess structure.
Example:
GTM>ZSYSTEM "GTM"
%GTM-I-BREAK, Break instruction encountered
At M source location +1^GTM$DMOD
GTM>SET $ZPROMPT="SPGTM> "
SPGTM>WRITE $ZPROCESS
MIKE_1
SPGTM>ZATTACH
GTM>ZAT "MIKE_1"
SPGTM>HALT
GTM>
This demonstrates a simple test of ZSYSTEM and ZATTACH, using ZSYSTEM to start a GT.M spawned process. SETting $ZPROMPT modifies the GTM> prompt to make it easier to tell which process we're in. The ZATTACH with no argument returns us to the master process of the job. Then the ZATTACH with an argument gives control to the spawned process. The HALT terminates the spawned process and returns control to the master process.