The TRESTART command attempts to RESTART the current transaction. A RESTART transfers control back to the initial TSTART and restores much of the process state to what it was when that TSTART was executed. Errors are produced if a TRESTART is used when no transaction is in progress ($TLEVEL=0) and when the transaction does not have RESTART enabled.
The format for the TRESTART command is:
TRE[START][:tvexpr]
The optional truth-valued expression immediately following the command is a command postconditional that controls whether or not GT.M executes the command.
Because TRESTART has no argument, at least two (2) spaces must follow the command to separate it from the next command on the line.
TRESTARTs (and implicit RESTARTs) do not restore any device states; they do restore the following to the state they had when GT.M executed the initial TSTART:
$TEST
The naked indicator
LOCKs held by the process
They also restore any local variables named by one or more active TSTARTs to the values they had when they were first named.
For an example of the use of the TRESTART command, refer to the chapter on "General Language Features of M" in this manual.