HELPLIB.HLB  —  SQLMOD72  Character Parameters
    To ensure that you specify the length of character string
    parameters correctly, use the following guidelines:

    o  For C host language programs that call SQL modules declared
       with LANGUAGE C, any character parameters 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 host language programs (or C host language programs
       that call SQL modules declared with LANGUAGE GENERAL), any
       character parameters 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 the number of octets for
       each character in the character set of the column and whether
       the SQL module language interprets the length of columns in
       characters or octets. A program can control how the SQL module
       language interprets the length of columns in the following
       ways:

       -  The CHARACTER LENGTH clause of the module header or DECLARE
          MODULE statement

       -  The DIALECT clause of the module header or DECLARE MODULE
          statement

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