COBOL Manual for TNS/E Programs (H06.03+)
Data Division
HP COBOL Manual for TNS/E Programs—520347-003
7-95
Descriptions of Condition-Names for Values
(Level 88)
Usage Considerations:
•
Condition-Name Description Location
All condition-name entries for a particular conditional variable must immediately
follow the entry describing that variable.
•
Cannot Use With Certain Descriptions
A condition-name can be associated with any data description entry, even if
specified explicitly or implicitly as FILLER, with these exceptions:
°
Level-66 items
°
Level-88 items
°
Index data item
°
Data structure having any subordinate item described with the JUSTIFIED or
SYNCHRONIZED clause, or which are not USAGE DISPLAY
As the syntax presentation shows, the only clause permitted in a condition-name
entry is the VALUE clause containing the value, values, or range of values
associated with the condition-name; therefore, the characteristics of the condition-
name are implicitly those of the condition variable.
Statement using one of the condition-names:
IF END-OF-FILE
PERFORM END-UP-OPERATION
CLOSE FILE-IN
END-IF
Definition of an item that has a range of values:
05 tax-code PIC 99.
88 tax-range VALUES ARE 00, 03, 07 THROUGH 11.
Statement testing if tax-code is 00, 03, 07, 08, 09, 10, or 11:
IF NOT TAX-RANGE
PERFORM TAX-ERROR-ROUTINE.
Example 7-23. VALUE Clauses for a Level-88 Data Item
01 ZIP-CODE.
03 ZIP-FIRST-3 PICTURE 999.
...
88 NEW-YORK VALUE IS 090 THRU 098,
100 THRU 149.
88 PENNSYLVANIA VALUE IS 150 THRU 196.
...
Example 7-22. Condition-Names for Values (Level 88) (page 2 of 2)










