The VALUE OF clause specifies the description of an item in the label records associated with a file.
The VALUE OF clause of the file description entry is classed as an obsolete element in the ANSI'85 standard and is scheduled
to be deleted from the next full revision of the ANSI Standard.
All dialects in this COBOL implementation fully support this syntax. The FLAGSTD Compiler directive can be used to detect
all occurrences of this syntax.
Although it is a part of the standard COBOL definition, this feature is explicitly excluded from the X/Open COBOL language
definitions and should not be used in a conforming X/Open COBOL source program.
General Formats (All Files)
Syntax Rules (All Files)
- implementor-name-1 may be any user-defined word or the words LABEL, or FILE-ID. When implementor-name-1 is LABEL or FILE-ID,
only one implementor-name-1 may be specified in a single VALUE OF clause; specify additional VALUE OF clauses within the file-description-entry
if you need multiple LABEL or FILE-ID implementor-names.
- Data-name-1 must be defined in the Working-Storage Section, except when implementor-name-1 is set to LABEL, in which case,
data-name-1 does not have to be defined.
- Data-name-1 should be qualified when necessary, but cannot be subscripted or indexed, nor can it be an item described with
the USAGE IS INDEX clause.
- Literal-1 must be a nonnumeric literal and cannot be a figurative constant.
- The VALUE OF FILE-ID clause should not be used if external-file-reference, data-name-1 or literal-1 has been specified in
the ASSIGN clause in the file control entry (see the topic
The File Control Entry in the chapter
Environment Division). If it is used in one of these cases, the VALUE OF FILE-ID specification overrides the file control entry specification,
as indicated by
COBCH1658 VALUE OF FILE-ID overriding ASSIGN (1658-E) at compile time.
General Rules (All Files)
- This clause is documentary only, except when implementor-name-1 is set to FILE-ID.
- When implementor-name-1 is set to FILE-ID, the character-string specified in literal-1 or data-name-1 is taken as the external