I have my server on AS400. I connect to it using DB2Connect.
In the AS400 server I have three kinds of tables one for English, one
for Chinese and one for Thai.
I need to use the DB2connect on my unix machine to read data from each
of these tables.
If I set the DB2CODEPAGE to 1208 (Unicode) will it work fine and read
all these three languages.
When I set DB2CODEPAGE as 1208 and run an application it fails with
the below error.
SQL Error [
[IBM][CLI Driver][AS] SQL0969N There is no message text corresponding
to SQL error "-330" in the message file on this workstation. The
error was returned from module "QSQROUTA" with original tokens "0 *N
*N 1208 0". SQLSTATE=22021
sqlstate = 22021
[IBM][CLI Driver][AS] SQL0969N There is no message text corresponding
to SQL error "-330" in the message file on this workstation. The
error was returned from module "QSQROUTA" with original tokens "0 *N
*N 1208 0". SQLSTATE=22021
sqlstate = 22021
Database driver error...
Function Name : Execute
SQL Stmt : SELECT rva810data.DEMO037.CHAR037 FROM rva810data.DEMO037
[IBM][CLI Driver][AS] SQL0969N There is no message text corresponding
to SQL error "-330" in the message file on this workstation. The
error was returned from module "QSQROUTA" with original tokens "0 *N
*N 1208 0". SQLSTATE=22021
sqlstate = 22021
Any inputs on how to resolve this would be helpful.
Regards,
Pattabhi Raman
> I have my server on AS400. I connect to it using DB2Connect.
>
[quoted text clipped - 39 lines]
>
> Any inputs on how to resolve this would be helpful.
This command on the server can produce the message info below:
===> dspmsgd sql0330 qsqlmsg
The last two message tokens (1208 and 0) would seem to indicate the
source CCSID for conversion is 1208 and the target CCSID is 0. You
might try determining what CCSID is associated with the server user
profile being used to run the application (used for SQL CONNECT). On a
server command line:
===> dspusrprf [my-usrprf]
Then scroll down to find the line labelled "Coded character set
identifier". If it has a value of 0, you can change it to a non-zero
value, eg:
===> chgusrprf usrprf(my-usrprf) CCSID(nnn)
Here is some online CCSID info:
www.ibm.com/servers/eserver/iseries/software/globalization/ccsid.html
Message ID . . . . . . . . . : SQL0330
Message file . . . . . . . . : QSQLMSG
Library . . . . . . . . . : QSYS
Message . . . . : Character conversion cannot be performed.
Cause . . . . . : An attempt was made to convert column or host
variable &2 to column or host variable &3. The conversion cannot be
performed. If the source data is character and has a mixed Coded
Character Set Identifier (CCSID), then double-byte characters were
found. These mixed data conversions are only allowed if the source data
does not contain any double-byte data. If the data is graphic, the
CCSID values are not compatible or the string contains single-byte
characters. The source CCSID is &4, and the target CCSID is &5.
Recovery . . . : Ensure that all character or graphic comparison,
concatenation, or assignment is between columns or host variables
with compatible CCSID values. If character data and the source
CCSID is mixed, the source data should not contain any double-byte
characters. If graphic data, the string cannot contain single-byte
characters. Use a casting function like VARCHAR to convert between
character, DBCS graphic, and Unicode graphic data.
Decimal Vary
Field Data Type Length Positions Length
&1 *BIN 2
&2 *CHAR *VARY 2
&3 *CHAR *VARY 2
&4 *BIN 4
&5 *BIN 4
--
Karl Hanson