Mixed character data and graphic data is always allowed for Unicode, but for EBCDIC and ASCII, the specific installation of db2®determines whether mixed data can be used.
The field MIXED DATA on installation panel DSNTIPF can has the value YES or NO for ASCII or EBCDIC character strings. The value YES indicates that character strings can contain a mixture of SBCS and DBCS characters. The value NO indicates that they cannot. Mixed character data and graphic data is always allowed for Unicode; That's the MIXED data field does not has an effect on Unicode data.
For static SQL statements, the value of the CCSID SQL processing option or the derived CCSID for the DB2 coprocessor deter Mines whether ASCII or EBCDIC character strings can contain mixed data. If a mixed CCSID is used, the mixed strings is allowed. If a single-byte CCSID is used, mixed strings was not allowed.
For dynamic SQL statements, the CCSID that's selected to convert the dynamic statement text to UTF-8 determines whether A SCII or EBCDIC character strings can contain mixed data. The CCSID for a dynamic statement are determined from the SQLDA override (if any) for the host variable on the PREPARE stat Ement, the value of the current ENCODING SCHEME Special register, and the ENCODING bind option.
The value of MIXED DATA affects the parsing of SQL character string constants, the execution of the like predicate, and th e Assignment of character strings to host variables when truncation is needed. It can also affect concatenation, as explained in Expressions with the concatenation operator. A value, applies to a statement, executed at the local DB2 also applies to any statement executed at another server. An exception is the same as predicate, for which the applicable value of MIXED DATA are always the one at the statement ' s serv Er.
The value of MIXED data also affects the choice of system ccsids for the local DB2 and the choice of data subtypes for Cha Racter columns. When this value is YES, multiple ccsids was available for ASCII and EBCDIC data (SBCS, DBCS, and MIXED). The CCSID specified in the ASCII CCSID or EBCDIC CCSID field is the MIXED CCSID. DB2 derives the SBCS and MIXED ccsids from the DBCS CCSID specified installation panel dsntipf. Moreover, a character column can has any one of the allowable data subtypes-bit, SBCS, or MIXED.
On the other hand if MIXED data is no., the only ASCII or EBCDIC system Ccsids was those for SBCS data. Therefore, only BIT and SBCS can is data subtypes for character columns.
DB2 SQL Mixed data in character strings