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

.

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


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,
    • 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.