The procedure interruption feature applies only to procedures which have been called in a dialog or in the foreground (using CALL-PROCEDURE or INCLUDE-PROCEDURE).
A distinction must be made between interruptions on the system level and interruptions within procedures.
Interruptions within procedures can be triggered at any time by means of the HOLD-PROCEDURE command. A procedure can be interrupted on the system level with the
function key, whenever this is allowed. Whether or not a procedure is interruptible can be set in the procedure head by means of the INTERRUPT-ALLOWED operand in the SET-PROCEDURE-OPTIONS command. This setting can subsequently be modified in the procedure body by means of the MODIFY-PROCEDURE-OPTIONS command, again via the INTERRUPT-ALLOWED operand. In this way, interruptibility can be enabled or disabled for individual parts of the procedure. The setting for interruptibility cannot be modified when the procedure is called.In both cases (interruption with the HOLD-PROCEDURE command and interruption with the function key
), procedure execution is resumed when the RESUME-PROCEDURE command is entered at the system level.If an interruption of procedure execution is requested by means of the
key during a procedure that is not interruptible, the request is ignored.During procedure interruption, the user can, for example, call commands in interactive mode on the system level in order to check or modify the SYSFILE environment or can access all variables that are local to the interrupted procedure. Thus, the interruption dialog is part of the visibility range of the interrupted procedure.
During an interruption dialog, variables can also be declared which are then considered to be variables local to the interrupted procedure. If, for example, an attempt is made within a procedure to access a variable that is not declared, the procedure can be interrupted within the framework of the relevant error handling routine and the missing variable can be declared on the system level.