Controls access to local and global symbols in command
procedures.
Format
SET SYMBOL
1 – Qualifiers
1.1 /ALL
/ALL (default)
Specifies that the values of the /SCOPE qualifier pertain both
to the translation of the first token on a command line and to
general symbol substitution.
The /ALL qualifier is incompatible with the /GENERAL or the /VERB
qualifier.
1.2 /GENERAL
Specifies that the values of the /SCOPE qualifier pertain to the
translation of all symbols except the first token on a command
line.
The /GENERAL qualifier is incompatible with the /ALL or the /VERB
qualifier.
1.3 /SCOPE
/SCOPE=(keyword,...)
Controls access to local and global symbols. Lets you treat
symbols as being undefined. Possible keywords are as follows:
NOLOCAL Causes all local symbols defined in outer procedure
levels to be treated as being undefined by the current
procedure and by all inner procedure levels.
LOCAL Removes any symbol translation limit set by the current
procedure level.
NOGLOBAL Causes all global symbols to be inaccessible to the
current procedure level and to all inner procedure
levels unless otherwise changed.
GLOBAL Restores access to all global symbols.
1.4 /VERB
Specifies that the values of the /SCOPE qualifier pertain
to the translation of the first token on a command line as a
symbol before processing only. It does not affect general symbol
substitution.
NOTE
Caution must be used if the SET SYMBOL/VERB/SCOPE command
is used more than once in a command procedure. Because
DCL uses the translation behavior when looking for a
label or subroutine, execution may be different running
in one mode than in another. VSI recommends that the SET
SYMBOL/VERB/SCOPE command be used once as part of the
command procedure setup and left in that mode for the
duration of the procedure.
The /VERB qualifier is incompatible with the /ALL or the /GENERAL
qualifier.
2 – Examples
1.$ SET SYMBOL/SCOPE=NOLOCAL
In this example, all local symbols defined in outer procedure
levels are now undefined for the current procedure level and
all inner procedure levels.
2.$ SET SYMBOL/SCOPE=NOGLOBAL
In this example, all global symbols are now inaccessible to the
current procedure level and all inner procedure levels unless
otherwise changed.
3.$ NOW :== SHOW TIME
$ !
$ NOW
3-NOV-2001 11:48:58
$ !
$ SET SYMBOL /VERB /SCOPE=NOGLOBAL
$ NOW
%DCL-W-IVVERB, unrecognized command verb-check validity and spelling
\NOW\
$ !
$ SHOW SYMBOL NOW
NOW == "SHOW TIME"
This example demonstrates the use of the /VERB qualifier.
The symbol NOW is assigned to the SHOW TIME command. The
next line shows the default behavior, where DCL attempts to
translate the first string on the command line (NOW). Because
NOW translates to the SHOW TIME command, this is used instead
of NOW.
The SET SYMBOL command on the next line changes the behavior
so that DCL does not attempt a translation. When NOW is
subsequently entered, DCL uses the string NOW as the command
verb and cannot find it in the command table. This results in
the error message.
Notice that the scoping of the verb translation has no effect
on general symbol translations, as demonstrated by the SHOW
SYMBOL command in the example.