The VALUE OF Clause

The VALUE OF clause specifies the description of an item in the label records associated with a file.

ANS85 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.

MF All dialects in this COBOL implementation fully support this syntax. The FLAGSTD Compiler directive can be used to detect all occurrences of this syntax.

XOPEN 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)

  1. 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.
  2. 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.
  3. 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.
  4. MF Literal-1 must be a nonnumeric literal and cannot be a figurative constant.
  5. MF  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)

  1. MF This clause is documentary only, except when implementor-name-1 is set to FILE-ID.
  2. MF 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 file-name.