![]() |
*ON Define Events for Latent Conditions
*ON %END CONTINUE | SKIP .label
*ON %END will be satisfied when the user requests CFS to be terminated (*/END commands, K1 key). When the %END condition has been satisfied, the procedure will be restarted automatically, and the action specified in the ON statement will be carried out.
CONTINUE The procedure will be restarted automatically at the point at which it was interrupted by the last *DIA statement.
SKIP .label The procedure will be restarted automatically at the specified label.
Notes:
The *ON %END condition will also be satisfied if CFS is terminated by a /LOGOFF, /DO, /CALL, /EXEC, or /LOAD command. The execution of the specified command will be delayed by CFS until all commands in the termination routine have been processed, after which the relevant BS2000 command will be processed.
The *ON %END condition will not be fulfilled if CFS is terminated abnormally (see *ON %ABEND statement described earlier). The *ON %END statement is also not satisfied if CFS is terminated in procedure controlled mode by an END command, or by answering T to the termination query.
From the above it can be seen that an END command specified within the *ON %END command sequence will lead to the unconditional termination of CFS.
The *ON %END statement can be used to initiate a command sequence to terminate CFS (CFS Shutdown). This command sequence is the logical counterpart to a CFS Startup file. This could be used, for example, to close all opened Connections in a controlled manner. In addition, it can be used to save the command memory to a file or library.
An example of the *ON %END statement can be found in Chapter 20 "Startup".