COBOL Manual for TNS/E Programs (H06.03+)

Data Division
HP COBOL Manual for TNS/E Programs520347-003
7-94
Descriptions of Condition-Names for Values
(Level 88)
Descriptions of Condition-Names for Values
(Level 88)
You can assign a name to a specific value, set of values, or range of values that a data
item can have and use that name as a condition in a conditional statement. The name
is called a condition-name, and the data item associated with it is called a
conditional variable.
To do this, you must put one or more level-88 items (each including a condition-name
and a VALUE clause specifying a value or a range of values for that condition-name)
immediately after the data description of the conditional variable. You can put level-88
items in any section of the Data Division.
condition-name
is the name of the condition value.
value-1
is a literal. It is either a single value or the first in a range of values tested by the
condition.
value-2
is a literal and is the final value in a range of values tested by the condition.
Example 7-22. Condition-Names for Values (Level 88) (page 1 of 2)
Declaration:
05 RETURN-CODE PIC 99.
88 END-OF-FILE VALUE 01.
88 ERROR-ON-READ VALUE 02.
88 PERMANENT-ERROR VALUE 03.
88 ERROR-ON-WRITE VALUE 04.
88
condition-name
VALUE
IS
VALUES
ARE
value-1
THRU
value-2
THROUGH
VST112.vsd