EXEC Special Variables Special Variables Special variables are variable symbols that are assigned values by the EXEC interpreter. and that you can test or display in your EXEC procedures. In some cases. you may assign your own values to EXEC special variables; these cases are noted in the variable descriptions.
&n &n special variable represents the numeric variables &1 through &30. When an is invoked. the numeric variables from &1 through &30 are
initialized according to the arguments that are passed to the EXEC file
(if any, .
The numeric variables can be reset by either an &ARGS or &READ ARGS control statement; when fewer than 30 arguments are set or reset. the
remainder of the &n variables are set to blanks. A particular argument
can be set to blanks by assigning it a percent sign (%) when invoking
the procedure. in an &ARGS control statement. or in an &READ ARGS control statement. An argument is also set to blanks if it begins with
the character X'FF' and is specified when invoking the EXEC procedure or
in an &READ ARGS control statement. You may set the values of specific
statements. value of n. however. that
than 0 is rejected by the EXEC interpreter.
&* and &$
arguments using assignment
is greater than 30 or less variables can be used to perform a collective test on all of the
arguments passed to the EXEC procedure. &* and &$ may only be used in
the &IF and &LOOP control statements and are described under the
description of the elF control You may not assign values to the special variables &* and &$. &0 The &0 special variable contains the filename of the EXEC file. You may
test and manipulate this variable. &DISKx You can use the &DISKx special variable to determine whether a disk is
an OS, DOS, or CMS disk. x represents the mode letter at which the disk
is accessed. For example, if you access an OS disk with a mode letter
of C, then the special variable &DISKC has a value of as. The possible
values for the &DISKx special variable are os (for an as disk), DOS (for
a DOS disk), CMS (for a CMS disk). and NA (when the disk is not
accessed) . You may set or change the values of an &DISKx special variable; if
you do so, however, you will no longer be able to test the status of the
disk at mode x. 300 VM/370 CMS Command and Macro Reference
&OISK* '!'he &DISK* the first read/write NONE. EXEC Special Variables special variable contains the one-character mode letter of
read/write disk in the CMS search order. If you have no
disks accessed, this special variable contains the value You may assign a value to the &DISK* special variable for your own
use; if you do so, however, you will not be able to use it to obtain the
filemode letter of a read/write disk. &OISK? You can use the &DISK? special variable in an EXEC to determine which
read/write disk that you have accessed has the most space on it. If you
have no read/write disks accessed, &DISK? contains the value NONE. You may assign a value to the &DISK? special variable for your own
use; if you do so, however, you will no longer be able to locate the
read/write disk with the most space. &OOS special variable contains one of the two character values ON or OFF, depending on whether the eMS/DOS environment is active. If you
have issued the command:
set dos on
then the &DOS special variable contains the value ON. You may set or change the value of the &DOS special variable for your
own use; if you do so, however, you will not be able to test whether the CMS/DOS environment is active.
&EXEC &EXEC special variable is the filename of the EXEC file. You cannot
set this variable explicitly but you can examine and test it.
&GLOBAL &GLOBAL sDecial variable contains the recursion level of the EXEC currently executing. Since the EXEC interpreter can handle up to 19
levels of recursion, the value of &GLOBAL ranges from 1 to 19. You cannot set this variable explicitly, but you can examine and test it. Section 5. EXEC Control Statements 301
Previous Page Next Page