The TCOMMIT command marks the end of a transaction or sub-transaction and decrements $TLEVEL. If TCOMMIT marks the end of a transaction (decrements $TLEVEL to zero), it invokes a COMMIT, which makes the database updates performed by the transaction generally available. A TCOMMIT issued when no transaction is in progress ($TLEVEL=0) produces an error.
The format of the TCOMMIT command is:
The optional truth-valued expression immediately following the command is a command postconditional that controls whether or not GT.M executes the command.
Because TCOMMIT has no argument, at least two (2) spaces must follow the command to separate it from the next command on the line.
For an example of the use of the TCOMMIT command, see Chapter 5: “General Language Features of M”.