Halt

The HALT command stops GT.M program execution and causes GT.M to return control to the operating system environment that invoked the GT.M image.

The format of the HALT command is:

        H[ALT][:tvexpr]
      

A HALT releases all shared resources held by the process, such as devices OPENed in GT.M, databases, and GT.M LOCKs. If the value of $TLEVEL is greater than zero (0), a ROLLBACK is performed.

Because HALT and HANG share the same abbreviation (H), GT.M differentiates them based on whether an argument follows the command.

Example:

        $ gtm
        %GTM-I-BREAK, Break instruction encountered
         At M source location +1^GTM$DMOD
        
        GTM>HALT
        $
      

Because we invoke this GT.M image interactively, the HALT in Direct Mode leaves the process at the DCL prompt.