[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS DCL Dictionary


Previous Contents Index


SET ON

Enables error checking by the command interpreter after the execution of each command in a command procedure. Specify SET NOON to disable error checking.

Format

SET [NO]ON


Parameters

None.

Description

During the execution of command procedures, the command interpreter normally checks the status code returned when a DCL command or program image completes and saves the numeric value of this code in the reserved symbol named $STATUS. The low-order 3 bits of this value are also saved in the reserved symbol $SEVERITY. Command procedure execution aborts when either an error or fatal error is detected.

Use the SET NOON command to override default error checking. When SET NOON is in effect, the command interpreter continues to place the status code value in $STATUS and the severity level in $SEVERITY, but does not perform any action based on the values. As a result, the command procedure continues to execute no matter how many errors are returned.

Exception

If you use a CALL, GOSUB, or GOTO command and specify a label that does not exist in the current command procedure, the procedure issues a warning message and exits.

The SET ON or SET NOON command applies only at the current command level. If you use the SET NOON command in a command procedure that executes another procedure, the default, SET ON, is established while the second procedure executes.


Example


$ SET NOON 
$ DELETE  *.SAV;* 
$ SET ON 
$ COPY  *.OBJ  *.SAV 
      

This command procedure routinely copies all object modules into new files with the file type .SAV. The DELETE command first deletes all existing files with the .SAV file type, if any. The SET NOON command ensures that the procedure continues executing even if there are no files with the .SAV file type in the current directory. Following the DELETE command, the SET ON command restores error checking. Then the COPY command makes copies of all existing files with .OBJ file type.


Previous Next Contents Index