The BREAK command controls the action taken on use of the break key. It can be used, for example, the suppress quits during critical parts of an application.
QM maintains a count of the number of times that breaks are disabled. Each BREAK OFF command increments this count. The BREAK ON command decrements the count unless it is already zero. The BREAK RESET command sets the counter to zero.
The BREAK COUNT command reports the current value of the break inhibit counter.
If the break key is pressed whilst breaks are suppressed, the break is deferred until the count returns to zero by a subsequent use of BREAK ON. The normal action prompt will then appear. The BREAK CLEAR statement cancels any deferred break event.
For all of the above forms, @SYSTEM.RETURN.CODE is returned as the current value of the break inhibit counter unless an error occurs, in which case it is set to a negative error code.
The final form, BREAK ON USER n, is only available to users registered as administrators and enables the break key for the specified user. @SYSTEM.RETURN.CODE is returned as zero unless an error occurs, in which case it is set to a negative error code.