EXEC Control statements
Section 5. CMS EXEC Control Statements
This section describes the formats, usage rules, and default values for EXEC control words, including: Control statements Built-in functions Special variables
An procedure is a CMS file that contains a sequence of CRS commands and/or EXEC control statements. Control statements determine
the logic flow for EXEC, provide terminal communications, and may be
used to manipulate CMS disk files. For an introduction to the EXEC facilities, and for complete tutorial information, including examples,
consult the Guide. EXEC procedures may be invoked with the EXEC command, described in "Section 2. CMS Commands." You may also execute an EXEC procedure by
specifying its filename, as long as the implied EXEC function is in
effect.
section 5. EXEC Control Statements 277
EXEC Control statements-Assignment Statement
The Assignment Statement Use the assignment statement in an EXEC procedure to assign a value to a
variable symbol. Variable symbols may be tested and manipulated to
control the execution of an EXEC procedure. The format of the
assignment statement is:
r , I I I L- &variable
&variable
string
ae
fu nct ion X'xxxxxx I string
ae
function X'xxxxxx } 1 , I 1 I indicates the variable symbol which is assigned the
specified value. A variable may contain a maximum of eight
alphameric and national charactersr including the initial
ampersand, which is required. Except in the EXEC special
variables &* and &DISK*r a variable must not contain any
special characters.
is a data item of up to eight characters. It may also be a
variable symbol or null. Whether a numeric string is
treated as numeric or character data depends on how it is
used in the EXEC. If a string containing variable symbols
expands to more than eight charactersr it is truncated. If
the string consists of eight X'FF' characters r the variable
is set to a null string.
is an arithmetic expression consisting of a sequence of data
items that possess positive or negative integral values and
are separated by plus or minus signs:
&1 - 4 + &CALC - 6
is an built-in function followed by at least one token.
indicates up to six hexadecimal digits to be converted to
decimal before assignment. For example: &A = X'CO results in &A having the decimal value 192.
Hexadecimal conversion is not performed unless you have used
the &HEX ON control statement.
All variable symbols occurring in executable statements are substituted
before the statement is executed. An executable statement is (1) a eMS command liner or (2) an EXEC control statement (including assignment
statements) .
278 VM/370 CMS Command and Macro R2ference
Previous Page Next Page