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-20
VALUE Clause
VALUE Clause
A VALUE clause specifies the initial value of a Working-Storage item or the value of a
level 88 condition name.
Format 1 (Data Initialization) is:
literal
is the initial value to be assigned to a data item. The value can be a figurative
constant.
Format 2 (Condition Name Entries) is:
condition-name
is the name of the condition value.
value-1
is either a single literal value or the first of a range of literal values tested by the
condition.
value-2
is the final literal value in a range of literal values tested by the condition. The value
must be greater than value-1.
VALUE Clause for Data Initialization
Format 1 of the VALUE clause is used to assign an initial value to a Working-Storage
item at the time the program is entered. The VALUE clause must not conflict with other
clauses in the data description of an item or in the data descriptions of other items within
the hierarchy. The following rules apply:
•
If the VALUE clause is omitted, the compiler initializes to zero numeric elementary
data items in the Working-Storage Section that do not use an OCCURS clause.
•
If an item is numeric, all literals of the VALUE clause must be numeric and must be
in the range of values set by the PICTURE string. Truncation of nonzero digits is
not allowed. A signed numeric literal applies only to a signed numeric PICTURE
string. Initialization follows standard alignment rules.
•
If an item is nonnumeric, all literals of the VALUE clause must be nonnumeric and
must not exceed the size of the PICTURE string. JUSTIFIED clauses are ignored.
VALUE [ IS ] literal
88 condition-name , { VALUE [ IS ] }
{ VALUES [ ARE ] }
{ value-1 [ { THROUGH } value-2 ] } , ...
{ [ { THRU } ] }