COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
EVALUATE uses …object
The value 0 and the class of the corresponding selection subjectZERO or ZEROS or ZEROES (without NOT or
THRU)
The numeric value determined by the rules for evaluating
arithmetic expressions
arithmetic expression (without NOT or THRU)
The truth value determined by the rules for evaluating conditional
expressions
condition
No value—ANY matches any selection subjectANY
The range of all permissible subject values greater than or equal
to the first operand and less than or equal to the second operand
A range of items specified with the keyword
THRU but without the keyword NOT
(if the value of the first operand is greater than the value of the
second operand, there are no values in the range)
All permissible subject values not equal to the value, or not
included in the range of values, that would have been used if the
keyword NOT had been omitted
The keyword NOT followed by an item or a
range of items
TRUETRUE
FALSEFALSE
• Execution of the EVALUATE Statement
Execution of the EVALUATE statement begins with the comparison phase illustrated in Figure 14.
A comparison is satisfied if one of these conditions is true:
◦ The object is ANY (and the value of the subject is irrelevant).
◦ The corresponding subject and object were both assigned TRUE or both assigned
FALSE.
◦ The corresponding subject and object were assigned the same type of values (numeric
or nonnumeric) and the value assigned to the subject is equal to the value (or within
the range of values) assigned to the object, according to the rules for comparison
defined for a relation condition (see Relation Conditions in General (page 265)).
If each comparison in an object-list is satisfied, the object-list “qualifies.” After
the comparison phase ends, execution of the EVALUATE statement proceeds as shown
in Figure 15.
328 Procedure Division Verbs










