Data Description Entry Skeleton

A data description entry specifies the characteristics of a particular item of data.

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

.

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.

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

GUID-BAE7479C-3D38-4E18-BA0D-E9CDB074F28D-low.png

General Formats for 66 level item Format 2


*

General Formats for 88 level item Format 3


*

General Formats for 78 level item Format 4


General Formats for 78 level item

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,
    • OBJECT-REFERENCE,
    • PROCEDURE-POINTER,
    • PROGRAM-POINTER,
    • POINTER,
    • COMPUTATIONAL-1, COMPUTATIONAL-2,
    • BINARY-CHAR, BINARY-SHORT, BINARY-LONG, BINARY-DOUBLE,
    • FLOAT-SHORT, FLOAT-LONG,
    • 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. The EXTERNAL clause can be specified only in data description entries in the Working-Storage Section whose level-number is 01.
  7. The EXTERNAL clause and the REDEFINES clause must not be specified in the same data description entry.
  8. The EXTERNAL clause and the THREAD-LOCAL clause must not be specified in the same data description entry.
  9. The GLOBAL clause can be specified only in data description entries whose level-number is 01.
  10. 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. The TYPEDEF clause can only be specified in data description entries whose level-number is 01.
  12. 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.

    The SYNCHRONIZED clause can be specified for a group item.

  14. 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. Data-name-2 and data-name-3 can be implicitly qualified.
  17. The VALUE clause must not be specified for data items of class index, object, or pointer.
  18. 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. A constant-name.
  2. Condition-names can be associated with internal floating-point items.

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

  3. 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. 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. 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.
  6. The VOLATILE clause is documentary only.