VALUE Clause - Format 1 - Literal Value

Read syntax diagramSkip visual syntax diagram
VALUE Clause - Format 1 - Literal Value

>>-VALUE--+----+--literal--------------------------------------><
          '-IS-'            

Format 1 specifies the initial value of a data item. Initialization is independent of any BLANK WHEN ZERO or JUSTIFIED clause specified.

A Format 1 VALUE clause specified in a data description entry that contains, or is subordinate to an OCCURS clause, causes every occurrence of the associated data item to be assigned the specified value. Each structure that contains the DEPENDING ON phrase of the OCCURS clause is assumed to contain the maximum number of occurrences for the purposes of VALUE initialization.

The VALUE clause must not be specified for a data description entry that contains, or is subordinate to, an entry containing an EXTERNAL clause or a REDEFINES clause. This rule does not apply to condition-name entries.

If the VALUE clause is specified at the group level, the literal must be a nonnumeric literal or a figurative constant other than NULL or NULLS. The group area is initialized without consideration for the subordinate entries within this group. In addition, the VALUE clause must not be specified for subordinate entries within this group.

For group entries, the VALUE clause must not be specified if the entry also contains a USAGE (other than USAGE DISPLAY) clause.

The VALUE clause must not conflict with other clauses in the data description entry, or in the data description of this entry's hierarchy.

IBM Extension
IBM Extension

Any VALUE clause associated with COMPUTATIONAL-1 or COMPUTATIONAL-2 (internal floating-point) items must specify a floating-point literal. The condition-name VALUE phrase must also specify a floating-point literal. In addition, the figurative constant ZERO and both integer and decimal forms of the zero literal can be specified in a floating-point VALUE clause or condition-name VALUE phrase.

For more information on floating-point literal values, see Floating-Point Literals.

A VALUE clause cannot be specified for external floating-point items.

A VALUE clause associated with a DBCS item must contain a DBCS literal or the figurative constant SPACE or SPACES.

Start of changeA VALUE clause associated with a national character (PIC N) item must contain a non-numeric literal, a national literal, or the figurative constant SPACE or SPACES.End of change

Start of change A VALUE clause associated with a national numeric (PIC 9) item must contain a numeric literal or the figurative constant ZERO/ZEROS/ZEROES. End of change

Start of change A VALUE clause that specifies a national literal can be associated only with a data item of class national. End of change

Start of change A VALUE clause that specifies a DBCS literal can be associated only with a data item of class DBCS. End of change

A VALUE clause may be specified in the data description entry for a type-name. Such a VALUE clause is used to initialize any data name (which is not a type-name), that is defined using a TYPE clause that references such a type-name. If a VALUE clause is specified in the data description of the subject of a TYPE clause, any VALUE clause specified in the description of the associated type-name is ignored for this entry.

A data item cannot contain a VALUE clause if the prior data item contains an OCCURS clause with the DEPENDING ON phrase. A variably located item cannot contain the VALUE clause.

A VALUE clause associated with a date, time, or timestamp item must be a non-numeric literal. The literal is aligned according to alignment rules. No formatting of the literal is done to match conversion specifiers or LOCALE definition, except if the USAGE of the item is PACKED-DECIMAL, in which case the non-numeric literal is converted to packed.

End of IBM Extension
End of IBM Extension
Related Information: