BREAK

Top  Previous  Next

 

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.

 

 

Format

 

BREAK OFFTo suppress quits

 

BREAK ONTo enable quits

 

BREAK CLEARTo cancel deferred breaks

 

BREAK COUNTTo report the number of active BREAK OFF commands

 

BREAK ON USER nTo enable the break key for the specified user

 

 

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 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.