Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / May 2007

Tip: Looking for answers? Try searching our database.

DB2CODEPAGE related query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rajivblr@gmail.com - 30 May 2007 12:09 GMT
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
Karl Hanson - 30 May 2007 13:57 GMT
> 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.