Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
5-21
VALUE Clause
•
The VALUE clause is not permitted in a data description entry that meets the
following criteria:
°
The entry contains an OCCURS or REDEFINES clause.
°
The entry is subordinate to an entry containing an OCCURS or REDEFINES
clause.
°
The entry has a variable size due to an OCCURS clause in a subordinate entry.
•
If the VALUE clause is used for initialization at the group level, the literal must be a
figurative constant or a nonnumeric literal. The group area is initialized without
consideration for the individual elementary or other group items within this group.
Thus, the group should not have items with descriptions that include JUSTIFIED or
USAGE IS COMPUTATIONAL clauses. A VALUE clause cannot appear at the
subordinate levels within this group.
The following example illustrates the VALUE clause used for data initialization:
WORKING-STORAGE SECTION.
01 main-heading.
05 FILLER PIC XX VALUE SPACES.
05 FILLER PIC X(8) VALUE "DIVISION".
05 FILLER PIC XX VALUE SPACES.
05 FILLER PIC X(6) VALUE "REGION".
:
01 counters.
05 no-of-reads PIC 9(5) VALUE ZEROS.
05 no-of-writes PIC 9(5) VALUE ZEROS.
VALUE Clause for Condition-Name Entries
Format 2 of the VALUE clause is used with condition-name entries. A data item
assigned in the Data Division using a level 88 data item is a condition-name; the item
under which the 88 appears is the condition variable. A value or a range of values can
be defined within this variable for testing. Each entry under a condition variable
includes a condition-name with a VALUE clause specifying a value or a range of values
for that condition-name.
All condition-name entries for a particular condition variable must immediately follow
the entry describing that variable. A condition-name can be associated with any data
description entry, even if specified as FILLER, with the following exceptions:
•
A condition-name cannot be associated with a level 66 or 77 item.
•
A condition-name cannot be associated with a group item with a JUSTIFIED or
USAGE IS COMPUTATIONAL clause.
A single value, several values, or a range of values can be given for a condition-name
entry.