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

Data Fundamentals
HP COBOL Manual for TNS/E Programs520347-003
4-26
Condition-Names
This IF statement uses the condition-name RESTRICTED-USE to test the value of
USE-CODE:
IF RESTRICTED-USE IN PART-NUMBER (30)
PERFORM REPORT-VIOLATION
ELSE ...
Using condition-names also makes it easier to modify the program. Suppose the table
definition in Example 4-10 changes so that both 1 and 2 mean RESTRICTED-USE.
Without the use of a condition-name, the program must examine and possibly change
each instance of the testing of the value of USE-CODE. With the condition-name, only
the data description entry needs changing:
88 RESTRICTED-USE VALUES ARE 1, 2.
SET RESTRICTED-USE TO TRUE
The SET statement sets USE-CODE to the value 1, the first value in the list.