-189   CCSID ccsid IS INVALID

Explanation

To determine the subtype of an input host variable or result column, the SYSSTRINGS catalog table was accessed with the specified CCSID and, one of the following error conditions occurred:
  • The CCSID is not a value of either INCCSID or OUTCCSID.
  • The TRANSTYPE column classifies the CCSID as GRAPHIC rather than CHARACTER.
  • A graphic CCSID has not been specified on your system.
  • The CCSID is outside the acceptable range of values. The CCSID must be between 1 and 65533, inclusive, or the value 65535.
  • A DBCS CCSID was specified when casting to CHAR, VARCHAR or CLOB.
  • An SBCS or mixed CCSID, or 65535 was specified when casting to a graphic data type.
  • CCSID 65535, which is valid only for data with the FOR BIT DATA attribute, was specified when casting to a CLOB.

This error can occur when SYSSTRINGS is accessed with a pair of CCSIDs to determine if a translation is defined for the pair. In this case, the error is the inconsistency between the data type of a string and the TRANSTYPE classification of its CCSID (one is GRAPHIC and the other is CHARACTER).

This error can also occur when a CCSID specified in DECP does not exist as a value in the INCCSID or OUTCCSID columns of SYSSTRINGS.

Another reason this error can occur is that you may be using one of the graphic built-in functions but a graphic CCSID was not specified during system installation.

System action

The statement cannot be bound or executed.

Programmer response

Ensure that the CCSID is valid and consistent with the data type of the string. If a valid CCSID is not listed in a built-in row of SYSSTRINGS, it can be defined by inserting a user-provided row. If a valid CCSID is misclassified in a user-provided row, that row can be updated to correct the mistake.

If a graphic CCSID had not been specified at system installation, update your DECP to include a graphic CCSID and recycle your DB2®.

SQLSTATE

22522