DSNH102I E csectname STRING CONSTANT IS TOO LONG. STRING BEGINS string

Explanation

The string constant beginning with string has a length greater than the maximum allowed length. Most strings have these limits:
  • For a hexadecimal constant (X, GX, or UX), the number of hexadecimal digits must not exceed 32704.
  • Any other character string constant must be short enough so that its UTF-8 representation requires no more than 32704 bytes.
  • Any other graphic string constant must be short enough so that its UTF-8 representation requires no more than 32704 bytes.
  • The sum of the lengths of the UTF-8 representations of the constant values in an ENDING AT clause must not exceed 765 bytes. This clause applies to CREATE TABLE, ALTER TABLE, CREATE INDEX, or ALTER INDEX.
In some contexts, however, the limit is smaller.

For special registers, the allowable length depends on the particular special register. A string that exceeds the limit can be specified only through assignment from a host variable. If this release of Db2 increases the maximum allowed length of a string constant, then an attempt to exploit the new length before using the New Function Mode produces this SQL return code.

Two consecutive string delimiters are used to represent one string delimiter within the character string, but these count as 2 bytes when calculating the lengths of character string constants.

System action

If the SQL statement containing the string is a declaration, it is discarded. If the SQL statement containing the string is executable, it is replaced by host language statements that, if executed, set an error code in the SQLCA.

User response

Correct the string. If a shorter string is acceptable, reduce the length of the string constant. If a long string is required, a host variable is required.

Severity

8 (error)