ILE COBOL Language Reference
The execution of the EVALUATE statement operates as if each
selection subject and selection object were evaluated and assigned a numeric
or nonnumeric value, a range of numeric or nonnumeric values, or a truth
value. These values are determined as follows:
- Any selection subject specified by identifier-1,
identifier-2,... and any selection object specified by identifier-3
and/or identifier-5 without the NOT or THRU phrase, are assigned the value and
class of the data item that they reference.
- Any selection subject specified by literal-1,
literal-2,... and any selection object specified by literal-3 and/or
literal-5 without the NOT or THRU phrase, are assigned the value and class of
the specified literal. If literal-3 and/or literal-5 is the figurative
constant ZERO, it is assigned the class of the corresponding selection
subject.
- Any selection subject in which expression-1,
expression-2,... is specified as an arithmetic expression,
and any selection object without the NOT or THRU phrase in which
arithmetic-expression-1 and/or arithmetic-expression-3 is specified, are
assigned numeric values according to the rules for evaluating an arithmetic
expression. (See Arithmetic Expressions.)
- Note:
- Comparing one arithmetic expression to another is system-specific. The
truth status of the comparison may depend on the intermediate results created
on that system.
- Any selection subject in which expression-1, expression-2,
... is specified as a conditional expression,
and any selection object in which condition-1 and/or condition-2 is specified,
are assigned a truth value according to the rules for evaluating conditional
expressions. (See Conditional Expressions.)
- Any selection subject or any selection object specified by the
words TRUE or FALSE is assigned a truth value. The truth value "true"
is assigned to those items specified with the word TRUE, and the truth value
"false" is assigned to those items specified with the word FALSE.
- Any selection object specified by the word ANY is not further
evaluated.
- If the THRU phrase is specified for a selection object
without the NOT phrase, the range of values is all values that, when compared
to the selection subject, are greater than or equal to the first operand and
less than or equal to the second operand, according to the rules for
comparison. If the first operand is greater than the second operand,
there are no values in the range.
- Note:
- Results of comparisons with nonnumeric operands may not be consistent across
systems, if the comparisons depend on the system's native collating
sequence.
- If the NOT phrase is specified for a selection object, the
values assigned to that item are all values not equal to the value, or range
of values, that would have been assigned to the item had the NOT phrase been
omitted.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.