Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Procedure interruption

&pagelevel(3)&pagelevel

If procedure interruption is allowed (INTERRUPT-ALLOWED = *YES in the SET-PROCEDURE-OPTIONS or MODIFY-PROCEDURE-OPTIONS command), procedure execution can be interrupted with the key.

It is then possible to check the procedure status, modify the procedure environment etc., and resume procedure execution with the RESUME-PROCEDURE command or resume step-by-step execution with the TRACE-PROCEDURE command.

For example, the procedure status can be checked by means of the predefined functions. Thus, the PROC-LEVEL( ) function can be used to check the nesting level; the SYSFILE environment can be checked with the functions SYSCMD( ), SYSDTA( ) etc.; system files can then be rerouted with the ASSIGN-SYSDTA commands, and so on.

Variable contents can be output with the SHOW-VARIABLE command and structure layouts can be output with the SHOW-STRUCTURE-LAYOUT command.

You can query whether variables are declared using the IS-DECLARED( ) function and whether a declared variable already contains a value with the IS-INITIALIZED( ) function.

If the variables do not have the contents that are currently needed for the correct execution of the procedure, the programmer can assign them the correct contents by means of the SET-VARIABLE command.

When elements of complex variables are accessed, you can check whether the element names are correct, whether the elements are present, etc. The predefined functions FIRST-VARIABLE-NAME( ) and NEXT-VARIABLE-NAME, among others, are provided for this purpose.
These are only a few indications of how the programmer can query and amend the procedure environment interactively during the test phase. While the procedure is interrupted, not only SDF-P functions and commands can be used, but also BS2000
commands. For a detailed description of the SDF-P functions, see chapter “Predefinedfunctions” (Predefined functions ); for SDF-P commands, see chapter “SDF-P commands”. The BS2000 commands are described in “Commands” [3].