VMS Help  —  SQLPRE72  Host Language Variable Declarations, Character Parameters
    To ensure that you specify the length of character variables
    correctly, use the following guidelines:

    o  For the C language, any character variables that correspond
       to character data type columns must be defined as the length
       of the longest valid column value in octets, plus 1 octet to
       allow for the null terminator.

    o  For other languages supported by the SQL precompiler, any
       character variables that correspond to character data type
       columns must be defined as the length of the longest valid
       column value in octets.

    o  When calculating the length of the longest valid column value,
       you must take into consideration whether the SQL precompiler
       interprets the length of columns in characters or octets. A
       program can control how the SQL precompiler interprets the
       length of columns in the following ways:

       -  The CHARACTER LENGTH clause of the DECLARE MODULE statement

       -  The DIALECT clause of the DECLARE MODULE statement

       -  For dynamic SQL, the SET CHARACTER LENGTH statement
Close Help