-330   A STRING CANNOT BE USED BECAUSE IT CANNOT BE PROCESSED. REASON reason-code, CHARACTER code-point, HOST VARIABLE position-number

Explanation

AN error occurred during the processing of a string, or in the conversion of a string. The type of error is indicated by the reason-code:
8
Length exception (for example, expansion required for PC MIXED data exceeds the maximum length of the string).
12
Invalid code point (for example, use of the ERRORBYTE option of SYSSTRINGS).
16
Form exception (for example, invalid MIXED data).
20
Conversion procedure error (for example, an exit set the length control field of the string to an invalid value).
24
SBCS character found in string contained in a wchar_t or sqldbchar host variable.

If the reason-code is 12, code-point is the invalid code point. Otherwise, code-point is either blank or an additional reason-code returned by an exit.

If the string is the value of an input host variable, the position-number is the ordinality of the variable in the SQLDA. If the string is not the value of a host variable, the position-number is blank.

System action

The statement cannot be processed.

Programmer response

Take one of the following actions based on the reason-code:
8
Extend the maximum length of the host variable to allow for the expansion that occurs when the string is converted.
12
Change the convert table to accept the code-point or the data to eliminate the code-point.
16
If the string is described as MIXED data, change its description or change the string to conform to the rules for well-formed mixed data.
20
Correct the conversion procedure.
24
Delete the SBCS character from the graphic string.

SQLSTATE

22021