Data Description Entry Skeleton

MF or the characteristics of a programmer-defined type of data which can then be used to specify the description of one or more particular items of data

.

ANS85  A level 01 data description entry within the Working-Storage Section or File Section determines whether the data record and its subordinate data items have local names or global names.

ANS85 A level 01 data description in the Working-Storage Section determines the internal or external attribute of the data record and its subordinate data items.

General Formats for Format 1


*

General Formats for 66 level item Format 2


*

General Formats for 88 level item Format 3


*
MF 

General Formats for 78 level item Format 4


*

Syntax Rules

  1. The level-number in Format 1 can be any number from 01 through 49 or 77.
  2. The clauses can be written in any order with two exceptions: the data-name-1 or FILLER clause

    ANS85 , if specified,

    must immediately follow the level-number; the REDEFINES clause, when used, must immediately follow the data-name-1 or FILLER clause

    ANS85 if either is specified; otherwise it must immediately follow the level number

    .

  3. The PICTURE clause must not be specified for the subject of a RENAMES clause or for an item whose usage is
    • INDEX,
    • ISO2002MF OBJECT-REFERENCE,
    • PROCEDURE-POINTER,
    • ISO2002MF PROGRAM-POINTER,
    • POINTER,
    • OSVSVSC2MF COMPUTATIONAL-1, COMPUTATIONAL-2,
    • ISO2002MF BINARY-CHAR, BINARY-SHORT, BINARY-LONG, BINARY-DOUBLE,
    • ISO2002MF FLOAT-SHORT, FLOAT-LONG,
    • MF EVENT-POINTER, MONITOR-POINTER, MUTEX-POINTER, SEMAPHORE-POINTER or THREAD-POINTER.

    For any other entry describing an elementary item, a PICTURE clause must be specified except as indicated in the rule that immediately follows.

  4. The PICTURE clause may be omitted for an elementary item when an alphanumeric or national literal is specified in a format 1 VALUE clause. A PICTURE clause is implied as follows:
    1. if the literal is alphanumeric, 'PICTURE X(length)'
    2. if the literal is national, 'PICTURE N(length)'.

    where length is the length of the literal as specified in the topic Literals in the chapter Concepts of the COBOL Language.

  5. The words THRU and THROUGH are equivalent.
  6. ANS85 The EXTERNAL clause can be specified only in data description entries in the Working-Storage Section whose level-number is 01.
  7. ANS85 The EXTERNAL clause and the REDEFINES clause must not be specified in the same data description entry.
  8. MF The EXTERNAL clause and the THREAD-LOCAL clause must not be specified in the same data description entry.
  9. ANS85 The GLOBAL clause can be specified only in data description entries whose level-number is 01.
  10. ANS85 Data-name-1 must be specified for any entry containing the GLOBAL or EXTERNAL clause, or for record descriptions associated with a file description entry which contains the EXTERNAL or GLOBAL clause.
  11. MF The TYPEDEF clause can only be specified in data description entries whose level-number is 01.
  12. MF The TYPEDEF clause can only be used when data-name-1 is also specified. In other words, it cannot be used in the same data description with either an explicit or implicit FILLER clause.

    Note that if the TYPEDEF clause is specified for a group item, subordinate data descriptions can be defined with either an implicit or explicit FILLER clause.

  13. The clauses SYNCHRONIZED, PICTURE, JUSTIFIED, and BLANK WHEN ZERO must not be specified except for an elementary data item.

    OSVSVSC2 The SYNCHRONIZED clause can be specified for a group item.

  14. MF Literal-6 and integer-1 must not be floating-point values, must not be negative values and must not be more than 18 digits.
  15. If literal-6 is used as part of an expression, it must be an integer.
  16. OSVSVSC2 Data-name-2 and data-name-3 can be implicitly qualified.
  17. ISO2002 The VALUE clause must not be specified for data items of class index, object, or pointer.
  18. ISO2002MF If the ANY LENGTH clause is specified, the only other clauses permitted are level-number, entry-name, PICTURE, and USAGE.

General Rules

  1. Format 3 is used for each condition-name. Each condition-name requires a separate entry with level-number 88. Format 3 contains the name of the condition and the value, values, or range of values associated with the condition-name. The condition-name entries for a particular conditional variable must immediately follow the entry describing the item with which the condition-name is associated. A condition-name can be associated with any data description entry which contains a level-number except the following:
    1. Another condition-name.
    2. A level 66 item.
    3. A group containing items with descriptions including JUSTIFIED, SYNCHRONIZED or USAGE (other than USAGE IS DISPLAY).
    4. An index

      VSC2MF or pointer

      data item (see the topic The USAGE Clause).

    5. MF A constant-name.
  2. VSC2MF Condition-names can be associated with internal floating-point items.

    MF Condition-names can be associated with external floating-point items.

  3. MF Format 4 defines a constant-name, which is a symbolic name representing a constant value assigned to it when the source code is passed through your COBOL system. Your COBOL system replaces each reference to a constant-name by its value.
  4. MF The TYPEDEF clause allows you to declare a group or elementary data description as a type definition, which allows instances of that data description to be declared as data items using data-name-1 as typedef-name-1 in the USAGE clause. The type definition itself is not a data item with allocated storage.
  5. MF If the TYPEDEF clause is specified at a group level, the components of the type definition are implicitly declared for any data item of that type and are referenced using the usual COBOL rules of qualification for the data item.