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

The format of the HALT command is:


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

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


$ gtm

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