Inhaltsverzeichnis

COBOL Datendeklaration

Folgende Syntax wird für Datendeklarationen erkannt:

Format 1: data description entry

>>-level-number--+-------------+--+------------------+---------->
                 +-data-name-1-+  '-redefines-clause-'   
                 '-FILLER------'                         

>--+------------------------+--+-----------------------+-------->
   '-blank-when-zero-clause-'  '-dynamic-length-clause-'

>--+----------+-----+--------+--+--------------------+---------->
   '-EXTERNAL-'     '-GLOBAL-'  '-group-usage-clause-' 

>--+------------------+--+---------------+---------------------->
   '-justified-clause-'  '-occurs-clause-'   

>--+----------------+--+-------------+-------------------------->
   '-picture-clause-'  '-sign-clause-'   

>--+---------------------+--+--------------+-------------------->
   '-synchronized-clause-'  '-usage-clause-'   

>--+--------------+--+----------+-------------------------------><
   '-value-clause-'  '-VOLATILE-'   

blank-when-zero-clause

>>-BLANK--+------+--+-ZERO---+---------------------------------><
          '-WHEN-'  +-ZEROS--+   
                    '-ZEROES-'   

DYNAMIC LENGTH clause

>>--DYNAMIC--+--------+--+-----------------------------+--><
             '-LENGTH-'  '-LIMIT--+------+--integer-1--'
                                  '--IS--'                

group-usage-clause

>>-GROUP-USAGE--+----+--+--NATIONAL--+-----------------------------><
                '-IS-'  '---UTF-8----'           

justified-clause

>>-+-JUSTIFIED-+--+-------+------------------------------------><
   '-JUST------'  '-RIGHT-'   

occurs-clause

Format 1: fixed-length tables

>>-OCCURS--integer-2--+-------+--------------------------------->
                      '-TIMES-'   

   .------------------------------------------------------.   
   V                                                      |   
>----+--------------------------------------------------+-+----->
     |                                  .-------------. |     
     |                                  V             | |     
     '-+-ASCENDING--+--+-----+--+----+----data-name-2-+-'     
       '-DESCENDING-'  '-KEY-'  '-IS-'                        

>--+-----------------------------------+-----------------------><
   |                  .--------------. |   
   |                  V              | |   
   '-INDEXED--+----+----index-name-1-+-'   
              '-BY-'                       

Format 2: variable-length tables

>>-OCCURS--+---------------+--+--integer-2--+--+-------+--DEPENDING--->
           '-integer-1--TO-'  '--UNBOUNDED--   '-TIMES-'              

>--+----+--data-name-1------------------------------------------>
   '-ON-'                

   .------------------------------------------------------.   
   V                                                      |   
>----+--------------------------------------------------+-+----->
     |                                  .-------------. |     
     |                                  V             | |     
     '-+-ASCENDING--+--+-----+--+----+----data-name-2-+-'     
       '-DESCENDING-'  '-KEY-'  '-IS-'                        

>--+-----------------------------------+-----------------------><
   |                  .--------------. |   
   |                  V              | |   
   '-INDEXED--+----+----index-name-1-+-'   
              '-BY-'                       

picture-clause

>>-+-PICTURE-+--+----+--character-string--+--------------------------------+--><
   '-PIC-----'  '-IS-'                    '-BYTE-LENGTH--+----+-integer-1--' 
                                                         '-IS-' 

redefines-clause

>>--REDEFINES--data-name-2-------------------------------------><

sign-clause

>>-+--------------+--+-LEADING--+--+-------------------------+--><
   '-SIGN--+----+-'  '-TRAILING-'  '-SEPARATE--+-----------+-'    
           '-IS-'                              '-CHARACTER-'     

synchronized-clause

>>-+-SYNCHRONIZED-+--+-------+---------------------------------><
   '-SYNC---------'  +-LEFT--+   
                     '-RIGHT-'   

usage-clause

>>-+---------------+--+-BINARY--+--------+--------------+------><
   '-USAGE--+----+-'  |         '-NATIVE-'              |   
            '-IS-'    +-COMP--+--------+----------------+   
                      |       '-NATIVE-'                |   
                      +-COMP-1--+--------+--------------+   
                      |         '-NATIVE-'              |   
                      +-COMP-2--+--------+--------------+   
                      |         '-NATIVE-'              |   
                      +-COMP-3--+------------+----------+   
                      |         |        (1) |          |   
                      |         '-NATIVE-----'          |   
                      +-COMP-4--+--------+--------------+   
                      |         '-NATIVE-'              |   
                      +-COMP-5--+------------+----------+   
                      |         |        (1) |          |   
                      |         '-NATIVE-----'          |   
                      +-COMPUTATIONAL--+--------+-------+   
                      |                '-NATIVE-'       |   
                      +-COMPUTATIONAL-1--+--------+-----+   
                      |                  '-NATIVE-'     |   
                      +-COMPUTATIONAL-2--+--------+-----+   
                      |                  '-NATIVE-'     |   
                      +-COMPUTATIONAL-3--+------------+-+   
                      |                  |        (1) | |   
                      |                  '-NATIVE-----' |   
                      +-COMPUTATIONAL-4--+--------+-----+   
                      |                  '-NATIVE-'     |   
                      +-COMPUTATIONAL-5--+------------+-+   
                      |                  |        (1) | |   
                      |                  '-NATIVE-----' |   
                      +-DISPLAY--+--------+-------------+   
                      |          '-NATIVE-'             |   
                      +-DISPLAY-1--+--------+-----------+   
                      |            '-NATIVE-'           |   
                      +-INDEX---------------------------+   
                      +-NATIONAL--+--------+------------+   
                      |           '-NATIVE-'            | 
                      +-UTF-8-----+--------+------------+
                      |           '-NATIVE-'            |
                      +-----------objref phrase---------+     
                      +-PACKED-DECIMAL--+------------+--+   
                      |                 |        (1) |  |   
                      |                 '-NATIVE-----'  |   
                      +-POINTER-------------------------+   
                      +-PROCEDURE-POINTER---------------+   
                      '-FUNCTION-POINTER----------------'   

value-clause

>>-VALUE--+----+--+--literal--+--------------------------------><
          '-IS-'  +-NULL------+
                  '-NULLS-----'

Format 2: renames

>>-66--data-name-1--RENAMES--data-name-2------------------------>

>--+--------------------------+--------------------------------><
   '-+-THROUGH-+--data-name-3-'   
     '-THRU----'                  

Format 3: condition-name

>>-88--condition-name-1--+-VALUE--+----+---+-------------------->
                         |        '-IS-'   |   
                         '-VALUES--+-----+-'   
                                   '-ARE-'     

   .---------------------------------------.      
   V                                       |      
>----literal-1--+------------------------+-+--.----------------><
                '-+-THROUGH-+--literal-2-'        
                  '-THRU----'                     

>--+-------------------------------------------------------------------+--><
   |--+--------+--+-------+--+------+--FALSE--+------+-----literal3----|
      |--WHEN--|  |--SET--|  |--TO--|         |--IS--|

Zusätzlich werden TAA-Objektdeklarationen erkannt.