Cannot convert between code set (CCSID 819) and code set (CCSID 37)

Issue #36 resolved
Aaron Bartell created an issue

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)

  1. Brian Jerome

    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)

  2. Log in to comment