The OpenVMS DCL command HELP ON EXAMPLE
displays:
ON
Examples
1.$ ON SEVERE_ERROR THEN CONTINUE A command procedure that contains this statement continues to execute normally when a warning or error occurs during execution. When a severe error occurs, the ON statement signals the procedure to execute the next statement anyway. Once the statement has been executed as a result of the severe error condition, the default action (ON ERROR THEN EXIT) is reinstated.
According to the help if neither [-]x.for
nor [-]y.for
exist then the last two lines will not be executed:
$ on error then $ continue
$ rename [-]x.for []
$ rename [-]y.for []
$ type *.for
Is there a way to set the ON ERROR
handling as in the first line w/o placing an ON ERROR
statement between each line of the script?