Program resolution and execution
Program execution can be started in a number of ways. Either by pressing the F11 execute key in the KCML Workbench or by entering the RUN or LOAD RUN commands at the immediate mode prompt in the Workbench console window, or if a KCML program name immediately follows the KCML utility when it is called from the native operating system. Before program execution can begin the program is resolved. The resolution process performs the following functions:
Once the resolution process is complete and no errors have occurred, KCML then begins to execute the program code. If an error occurs during the resolution process an error is displayed and the resolution process is halted.
Resolution without execution can be forced by pressing the SHIFT-F9 in the KCML Workbench or by entering the RUN STOP command at the immediate mode prompt.
Once the program has been successfully resolved execution will begin at the first statement and will continue until either one of the following statements is executed:
or until the program executes the last line of the program, an unfielded error occurs or a TRAP event occurs.
Execution can be interrupted with the HALT or RESET keys if they have been enabled. The HALT key causes KCML to save the current program state and switch to the Workbench debugger window if available. If the terminal does not support the Workbench then the immediate mode prompt is displayed. Provided that the program is not altered by editing, adding or deleting program lines, the program can be restarted where it left off with the CONTINUE command. This can be done by pressing the 'C' key in the Workbench or alternatively the CONTINUE command can be entered directly at the immediate mode prompt. Execution can be restarted at any other line using 'S' command followed by the 'C' command. In immediate mode this can be done with the GOTO and CONTINUE commands. Each time the SPACEBAR is pressed KCML will single step through the program a line at a time.
If program lines are changed or if new lines are added to the program then the program must be re-resolved before it can be restarted.