Cannot convert between code set (CCSID 819) and code set (CCSID 37)
Issue #36
resolved
Working on a customer's machine today and came across an error I have not seen before.
Anyone know what I can check?
Scenario:
- Fresh install of yum.
- Running in a chroot
- Fresh install of Node.js v8.x.
- Fresh install of idb-connector.
- DSPSYSVAL QCCSID is 37
- They've used Node.js v6.x with the original database connector successfully.
Node REPL:
$ node
> var db = require('idb-connector');
var sSql = 'SELECT STATE FROM QIWS.QCUSTCDT';
var dbconn = new db.dbconn();
dbconn.conn("*LOCAL");
var stmt = new db.dbstmt(dbconn);
stmt.exec(sSql, (x) => {
console.log("%s", JSON.stringify(x));
stmt.cloCannot convert between code set (CCSID 1208) and code set (CCSID 37)
seCannot convert between code set (CCSID 819) and code set (CCSID 37)
ERROR: SQLALLOCENV(-1)();Cannot convert between code set (CCSID 819) and code set (CCSID 37)
undefined
> (node:2850) Warning: N-API is an experimental feature and could change at any time.
var sSql = 'SELECT STATE FROM QIWS.QCUSTCDT';
undefined
> var dbconn = new db.dbconn();
Cannot convert between code set (CCSID 819) and code set (CCSID 37)
bconn.disconnundefined
> dbconn.conn("*LOCAL");
undefined
> var stmt = new db.dbstmt(dbconn);
Error: SQLSTATE=PAERR SQLCODE=8013 The Dbconn Object is not connected
>
> stmt.exec(sSql, (x) => {
... console.log("%s", JSON.stringify(x));
... stmt.close();
... dbconn.disconn();
... dbconn.close();
... });
Comments (5)
-
-
chroot_setup nls
might help.Otherwise, suggesting assignment to @mengxumx
-
Just would like to add I'm getting the following error with the example:
Character conversion between CCSID 1208 and CCSID 65535 not valid.
Seeing if updating XMLSERVICE helps (not sure)
-
reporter @ThePrez and @kadler, having the customer try that right now.
@bjerome, you QCCSID is set to 65535 most likely. 65535 means "don't perform a translation", more or less. You should set it to a value. Mine is set to 37, for example. More CCSID reading here: http://yips.idevcloud.com/wiki/index.php/IBMi/65535
-
reporter - changed status to resolved
chroot_setup nls
cured the ailment! - Log in to comment
Are the iconv converters installed under
/QOpenSys/usr/lib/nls/loc/iconv
in the chroot?