|
VMS Help SET, VERIFY, Examples *Conan The Librarian |
1.$ SET VERIFY = PROCEDURE
In this example, procedure verification is turned on. If image
verification was on, it remains on; if image verification was
off, it remains off.
2.$ SET VERIFY
$ INDEX == "$INDEX.EXE"
$ CONTENTS == "$CONTENTS.EXE"
$ TABLE == "$TABLE.EXE"
$ SET NOVERIFY
$ EXIT
Procedure and image verification are turned on at the beginning
of the command procedure so that the system displays all the
command and data lines in the procedure as it reads them. At
the end of the procedure, the SET NOVERIFY command restores the
system default (no procedure or image verification).
3.$ PROC_VER = F$ENVIRONMENT("VERIFY_PROCEDURE")
$ IMAGE_VER = F$ENVIRONMENT("VERIFY_IMAGE")
$ HOLD_PREFIX = F$ENVIRONMENT("VERIFY_PREFIX")
$ SET PREFIX "(!%T)"
$ SET VERIFY
.
.
.
$ TEMP = F$VERIFY(PROC_VER, IMAGE_VER)
$ SET PREFIX "''HOLD_PREFIX'"
This command procedure uses the F$ENVIRONMENT lexical function
to save the current procedure and image verification setting,
as well as the current verification prefix string. The SET
PREFIX command sets the verification prefix to be used in
the current command procedure. It uses an FAO control string
to produce the time each command is read by the command
interpreter (DCL), surrounded by parentheses. Then the SET
VERIFY command turns on both procedure and image verification.
Subsequently, the F$VERIFY lexical function is used to restore
the original verification settings. The SET PREFIX command
returns the verification prefix to its previous setting. Note
how the symbol HOLD_PREFIX is used in the SET PREFIX command.
This preserves casing and special characters in the stored
string.
4.$ SET VERIFY
$ @TEST
$ RUN AVERAGE
1
2
3
$ EXIT
In this example, the SET VERIFY command turns procedure and
image verification on. When the command procedure TEST.COM is
executed interactively, the command lines and the data lines
for the program AVERAGE are displayed on the terminal. The data
lines were entered in the command procedure on lines that did
not begin with the DCL prompt.
5.$ SET VERIFY
$ COUNT = 1
$ IF P'COUNT' .NES. "" THEN GOTO &P'COUNT'
.
.
.
$ EXIT
When this command procedure is executed interactively, the
SET VERIFY command causes the command and data lines to be
displayed. Symbols that are substituted during the first
phase of symbol substitution (such as 'COUNT') are displayed
by the SET VERIFY command, but other symbols are not. The
following lines are displayed when this procedure is executed
interactively:
$ COUNT = 1
$ IF P1 .NES. "" THEN GOTO &P1
.
.
.
Although these values are not displayed, the value for P1 is
substituted during the third phase of symbol substitution, and
the value for &P1 is substituted during the second phase.
|
|