Handling Errors
$ SEVERITY = (STATUS .AND. 7)
$ IF SEVERITY .EQ. 0 THEN -
$ IF SEVERITY .EQ. 2 THEN -
$ IF SEVERITY .EQ. 4 THEN -
$ GOSUB ANNOUNCE_FATALERROR
Notes:
This code segment illustrates how to trap and handle errors without DCL’s intervention.
After the “statement” is executed, the value of $STATUS is saved, and the SEVERITY is derived from the saved STATUS.
Different actions are taken depending upon the value of the SEVERITY symbol.