Data Description Entry

A data description entry specifies the attributes of one data item.

Format 1

level-number [ data-name ]
             [ FILLER    ]

   [ REDEFINES prev-data-name ]

   [ IS EXTERNAL      ]
   [ IS GLOBAL        ]
   [ IS SPECIAL-NAMES   {CURSOR        } ]
                        {CRT STATUS    }
                        {CHART STATUS  }
                        {SCREEN CONTROL}
                        {EVENT STATUS  }

[ IS EXTERNAL-FORM [ IDENTIFIED BY template-file-name ] ]
   [ IS IDENTIFIED BY external-name                    ]

   [ {PICTURE} IS picture-string ]
     {PIC    }

   [ [ USAGE IS ] usage-type ]

   [ [ SIGN IS ] {LEADING } [ SEPARATE CHARACTER ] ]
                 {TRAILING}

   [ OCCURS 
         { table-size TIMES                       }
         { min TO max TIMES DEPENDING ON dep-item }

         [ {ASCENDING } KEY IS {key-name} ... ] ...
           {DESCENDING}

         [ INDEXED BY {index-name} ... ] ]

   [ {SYNCHRONIZED}  [LEFT ] ]
     {SYNC        }  [RIGHT]

   [ {JUSTIFIED} RIGHT ]
     {JUST     }

   [ BLANK WHEN ZERO ]

   [ VALUE IS value-lit ] .

Format 2

66 new-name RENAMES name-start [ {THRU   } name-end ] .
                                 {THROUGH}

Format 3

78 user-name VALUE IS {literal-1} [ {+} literal-2 ] .
                      {NEXT     }   {-}
                                    {*}
                                    {/}

Format 4

88 cond-name  {VALUE IS  } { low [ {THRU   } high ] } ...
              {VALUES ARE}         {THROUGH}

      [ WHEN SET TO FALSE false-val ] .

Syntax Rules

  1. Level-number in Format 1 can be any number from 01 through 49, or 77.
  2. Data description clauses may appear in any order, with two exceptions:
    • The optional data-name or FILLER clause must immediately follow the level-number.
    • The optional REDEFINES clause must immediately follow the data-name or FILLER clause.
  3. Only level 01 and level 77 Working Storage data items may be declared EXTERNAL. Each program that declares an external data item must use the same name for that item, and the item must occupy the same number of bytes. External data items may not have a VALUE phrase.
  4. The phrase IS GLOBAL is accepted by the compiler as a commentary.
  5. template-file-name and external-name are alphanumeric literals or unqualified data names. If a data name is used, it must refer to an unambiguous data item.
  6. Format 1 data description entries that specify a PICTURE clause, or a USAGE clause that allows a PICTURE clause, are elementary items. All other Format 1 entries are group items.
  7. There must be a PICTURE clause for all Format 1 elementary items except those that specify a USAGE clause that does not allow a PICTURE clause. See USAGE Clause for more information.
  8. The SYNCHRONIZED, PICTURE, JUSTIFIED, and BLANK WHEN ZERO clauses can appear only in a record description for an elementary item.
  9. A level 78 entry associates a value with the name of a constant. user-name names the constant, and literal may be any literal.
  10. Each cond-name requires a separate Format 4 entry. The level 88 entry associates a set of values with cond-name. All cond-name entries for a data item must immediately follow that data item's record description.
  11. A cond-name can be associated with any data item except the following:
    1. another cond-name
    2. a level 66 or 78 data item
    3. a group item that contains items with JUSTIFIED, SYNCHRONIZED, or USAGE (other than USAGE DISPLAY) clauses.
    4. an index data item

General Rule

The individual clauses are described in other topics in this help.