Character-host variables in PL/I applications that use SQL

This figure shows the syntax for valid scalar character-host variables.

Character

Read syntax diagramSkip visual syntax diagram
>>-+-DECLARE-+--+-variable-name-----------+--+-CHARACTER-+------>
   '-DCL-----'  |    .-,-------------.    |  '-CHAR------'   
                |    V               |    |                  
                '-(----variable-name-+--)-'                  

>--+--------------+--+---------+-------------------------------->
   '-(--length--)-'  +-VARYING-+   
                     '-VAR-----'   

>--+---------------------------------------+--;----------------><
   '-Alignment and/or Scope and/or Storage-'      

Notes:
  1. Length must be an integer constant not greater than 32766 if VARYING or VAR is not specified.
  2. If VARYING or VAR is specified, length must be a constant no greater than 32740.