Host array indicator structure in COBOL applications that use SQL

This figure shows the valid syntax for host structure array indicators.

Read syntax diagramSkip visual syntax diagram
                                              .-TIMES-.      
>>-level-1--variable-name--OCCURS--dimension--+-------+--.------>

                                .-IS-.                   
>--level-2--var-1--+-PICTURE-+--+----+--picture-string---------->
                   '-PIC-----'                           

            .-IS-.                          
   .-USAGE--+----+-.                        
>--+---------------+--+-BINARY----------+----------------------->
                      +-COMPUTATIONAL-4-+   
                      '-COMP-4----------'   

>--+-------------------------+--.------------------------------><
   |        .-IS-.           |      
   '-VALUE--+----+--constant-'      

Notes:
  1. level-1 indicates a COBOL level between 2 and 48.
  2. level-2 indicates a COBOL level between 3 and 48 where level-2 > level-1.
  3. Dimension must be an integer constant between 1 and 32767.
  4. BINARY, COMPUTATIONAL-4, and COMP-4 are equivalent. A portable application should code BINARY, because COMPUTATIONAL-4 and COMP-4 are IBM® extensions that are not supported in ISO/ANSI COBOL. The picture-string associated with these types must have the form S9(i) (or S9...9, with i instances of 9). i must be less than or equal to 4.