Host structure array in PL/I applications that use SQL

The following syntax diagram shows the syntax for valid structure array declarations.

Host structure array

Read syntax diagramSkip visual syntax diagram
>>-+-+-DECLARE-+--1--variable-name--(--dimension--)--+----------------------+--,-+-->
   | '-DCL-----'                                     '-Scope and/or storage-'    |   
   '-level-1--variable-name--,---------------------------------------------------'   

   .-,----------------------------------------.      
   V                                          |      
>----level-2--+-var-1-----------+--data-types-+--;-------------><
              |    .-,-----.    |                    
              |    V       |    |                    
              '-(----var-2-+--)-'                    

data-types

|--+-+-BINARY-+--+-FIXED-+--+-----------------+--UNALIGNED-----+--|
   | '-BIN----'  '-FLOAT-'  '-(--precision--)-'                |   
   +-+-DECIMAL-+--+-FIXED--+-------------------------------+-+-+   
   | '-DEC-----'  |        '-(--precision--+----------+--)-' | |   
   |              |                        '-,--scale-'      | |   
   |              '-FLOAT--+-----------------+--UNALIGNED----' |   
   |                       '-(--precision--)-'                 |   
   +-PICTURE--picture-string-----------------------------------+   
   +-+-CHARACTER-+--+--------------+--+-------------+----------+   
   | '-CHAR------'  '-(--length--)-'  '-+-VARYING-+-'          |   
   |                                    '-VAR-----'            |   
   +-SQL TYPE IS--+-+-CLOB-+--(--lob-length--+---+--)-+--------+   
   |              | '-BLOB-'                 '-K-'    |        |   
   |              +-+-CLOB_LOCATOR---+----------------+        |   
   |              | +-DBCLOB_LOCATOR-+                |        |   
   |              | '-BLOB_LOCATOR---'                |        |   
   |              '-+-CLOB_FILE---+-------------------'        |   
   |                +-DBCLOB_FILE-+                            |   
   |                '-BLOB_FILE---'                            |   
   +-SQL TYPE IS ROWID-----------------------------------------+   
   '-SQL TYPE IS--+-BINARY---------+--(--length--)-------------'   
                  +-VARBINARY------+                               
                  '-BINARY VARYING-'                               

Notes:
  1. Level-1 indicates that there is an intermediate level structure.
  2. Level-1 must be an integer constant between 1 and 254.
  3. Level-2 must be an integer constant between 2 and 255.
  4. For details on declaring numeric, character, LOB, ROWID, and binary host variables, see the notes under numeric-host variables, character-host variables, LOB host variables, ROWID, and binary host variables.
  5. Dimension must be an integer constant between 1 and 32767.