Example:
GTM>ZPRINT ^ZBTEST
ZBTEST;
DO SUB
QUIT
SUBWRITE !,"This is ZBTEST"
QUIT
GTM>ZBREAK SUB^ZBTEST
GTM>DO ^ZBTEST
%GTM-I-BREAKZBA, Break instruction encountered
during ZBREAK action
At M source location SUB^ZBTEST
GTM>ZSHOW "B"
SUB^ZBTEST
This inserts a ZBREAK with a default action at SUB^ZBTEST. After GT.M encounters the BREAK, the ZSHOW "B" displays this as the only ZBREAK in the image.
Example:
GTM>ZBREAK -*
GTM>ZGOTO
GTM>ZBREAK SUB^ZBTEST:"W !,""Trace"""
GTM>DO ^ZBTEST
Trace
This is ZBTEST
GTM>
This removes all existing ZBREAKs with a ZBREAK -*. Note that it is not necessary to remove ZBREAKs before modifying them. It also clears the process invocation stack with an argumentless ZGOTO. Then it uses a ZBREAK to insert a trace-point. Every time GT.M executes the line to where ZBREAK has established a trace-point, it performs the specified action without entering Direct Mode.
Example:
ZBREAK PRINT^TIME::5
This BREAKs execution at line PRINT in routine just before the fifth time the line is executed.
Example:
ZBREAK PRINT^TIME:"WRITE AVE BREAK":3
This inserts a ZBREAK action of WRITE AVE and BREAK before the third execution of PRINT^TIME.