I'm not sure how helpful that was. At least it didn't help me
I added a line to output the contents of the variable SQL prior to executing the update statement.
$ node index.js
Running on port 8018
SQLExecDirect(0): Select LSTNAM, CUSNUM from NODELIB.CUSTOMER
SQLNUMRESULTSCOLS(0) Column Count = 2
SQLDescribeCol(0) index[0] sqlType[12] colScale[0] colPrecise[50]
SQLDescribeCol(0) index[1] sqlType[2] colScale[0] colPrecise[6]
SQLFreeStmt: stmth 4 [SQL_DROP]
SQLFreeStmt(0)
UPDATE NODELIB.CUSTOMER SET CUSNUM=234,LSTNAM='Meador ',INIT='E',STREET='Plantation Road ' WHERE CUSNUM=234
[Error: SQLSTATE=HY010 SQLCODE=-99999 Error occurred in SQL Call Level Interface]
SQLExecDirect(0): Select LSTNAM, CUSNUM from NODELIB.CUSTOMER
SQLNUMRESULTSCOLS(0) Column Count = 2
SQLDescribeCol(0) index[0] sqlType[12] colScale[0] colPrecise[50]
SQLDescribeCol(0) index[1] sqlType[2] colScale[0] colPrecise[6]
SQLFreeStmt: stmth 4 [SQL_DROP]
SQLFreeStmt(0)
-----Original Message-----
From: OpenSource <opensource-bounces@xxxxxxxxxxxx> On Behalf Of Smith, Mike
Sent: Friday, October 5, 2018 1:49 PM
To: 'IBMi Open Source Roundtable' <opensource@xxxxxxxxxxxx>
Subject: Re: [IBMiOSS] error when running a node.js program
I have it working now except for the original HY010 error Here is the updated GIST
https://gist.github.com/masmithrpg/827db3d17806d1e0ac8191a9707d4754
I can create a new record, but can't edit or delete. Seems odd.
-----Original Message-----
From: OpenSource <opensource-bounces@xxxxxxxxxxxx> On Behalf Of Smith, Mike
Sent: Friday, October 5, 2018 8:47 AM
To: 'IBMi Open Source Roundtable' <opensource@xxxxxxxxxxxx>
Subject: Re: [IBMiOSS] error when running a node.js program
Sorry I'm not replying directly to your responses, but your responses are not showing up in my email.
I've added npm I idb-connector
And changed the code to use the idb-connector
Now of course I have more errors.
https://gist.github.com/masmithrpg/7d4f25949f54b0d641ffa5068f98870a
code in the gist is current with the exception of the idb-connector
error I'm now receiving is
TypeError: Class constructors cannot be invoked without 'new'
at /home/SMITHMIA/app1/index.js:25:19
at Layer.handle [as handle_request] (/home/SMITHMIA/app1/node_modules/express/lib/router/layer.js:95:5)
at next (/home/SMITHMIA/app1/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/SMITHMIA/app1/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/SMITHMIA/app1/node_modules/express/lib/router/layer.js:95:5)
at /home/SMITHMIA/app1/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/home/SMITHMIA/app1/node_modules/express/lib/router/index.js:335:12)
at next (/home/SMITHMIA/app1/node_modules/express/lib/router/index.js:275:10)
at urlencodedParser (/home/SMITHMIA/app1/node_modules/body-parser/lib/types/urlencoded.js:91:7)
at Layer.handle [as handle_request] (/home/SMITHMIA/app1/node_modules/express/lib/router/layer.js:95:5)
-----Original Message-----
From: OpenSource <opensource-bounces@xxxxxxxxxxxx> On Behalf Of Smith, Mike
Sent: Thursday, October 4, 2018 3:14 PM
To: 'IBMi Open Source Roundtable' <opensource@xxxxxxxxxxxx>
Subject: Re: [IBMiOSS] error when running a node.js program
I've made progress I think.
I uninstalled 5733OPS
I tried updating NODEVER. NO GOOD
I then removed NODEVER and reinstalled. NO GOOD Next I updated all the packages via YUM.
I can now use NODEVER
However my index.js script blow up now.
I think it has to do with
const db = require('/QOpenSys/QIBM/ProdData/OPS/Node6/os400/db2i/lib/db2a')
as I get the following
Cannot load module /QOpenSys/QIBM/ProdData/OPS/Node6/os400/db2i/bin/db2ia.node.
I suspect I need to point to a new location for NODE.JS 10 but I haven't been able to locate it so far.
MIke
-----Original Message-----
From: OpenSource <opensource-bounces@xxxxxxxxxxxx> On Behalf Of Smith, Mike
Sent: Wednesday, October 3, 2018 10:39 AM
To: 'IBMi Open Source Roundtable' <opensource@xxxxxxxxxxxx>
Subject: [IBMiOSS] FW: error when running a node.js program
Aaron,
I'm going to start with the version and see if that fixes the problem. However not knowing what I'm really doing, I'm having problems with that as well.
I signed on to putty.
Ran NODE -v
Shows v6.11.5
Then I ran YUM install nodejs10
Appears to have installed.
Tried to run NODEVER LIST
This gives me errors Could not load program node:
rtld: 0712-001 Symbol _ZNSt15_Sp_counted_ptrIDnLN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv was referenced
from module node(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv was referenced
from module node(), but a runtime definition
of the symbol was not found.
rtld: 0712-002 fatal error: exiting.
Updated NODEVER from ACS. Reran NODEVER with same error.
I appear to have node 10 loaded, but I don't see how to force it to use this version.
And I don't know what to do with the NODEVER errors.
Mike
From: Smith, Mike
Sent: Wednesday, October 3, 2018 9:50 AM
To: 'IBMi Open Source Roundtable' <opensource@xxxxxxxxxxxx>
Subject: error when running a node.js program
I am working through a CRUD node.js tutorial from LITMIS that I'm having a bit of a problem with.
I have it mostly working except the update/delete.
I can read the data fine.
I tested the sql statement on the update by copying and pasting in STRSQL and the statement runs fine.
I'm receiving the following
SQLSTATE=HY010 SQLCODE=-99999 Error occurred in SQL Call Level Interface<
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.google.com%2fsearch%3fq%3dSQLSTATE%253DHY010%2bSQLCODE%253D-99999%2bError%2boccurred%2bin%2bSQL%2bCall%2bLevel%2bInterface%26rlz%3d1C1CHBF_enUS795US795%26oq%3dSQLSTATE%253DHY010%2bSQLCODE%253D-99999%2bError%2boccurred%2bin%2bSQL%2bCall%2bLevel%2bInterface%26aqs%3dchrome..69i57j69i60l2.1462j0j7%26sourceid%3dchrome%26ie%3dUTF-8&c=E,1,qxgpGtGtGny_CifbsMqXdSyeE6blMr83k2IDIteBFjKAgL3EeRK6dl9_sp8ZHuaxpzBFPVRLWTRNeOquSeNSBIxdaCNT_s4VDlBrQPRlEILdr_T9hA,,&typo=1>
I found some references to this error indicating an issue with CCSSID. I checked my sysval and it is set at 37. User profile set to use *sysval.
Any thing else I might check.?
Mike
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.midrange.com%2fmailman%2flistinfo%2fopensource&c=E,1,04goN6hbduaZBllg5Z6XoQBNHfbp3vFxtzIUajZb8N8JB8ox3aqXeOBcowRvWHdGl6f5onOEnFCeSGNXRXpfmVw8RUwfOmSSZXmxGwArX9PJFqCe&typo=1
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2farchive.midrange.com%2fopensource.&c=E,1,FotpIkmBwatlTN6b6J5dS9lCZTnlT4s-TMRflf5_nLaXK_e6QM3PXDUvwvfIVR8unPg1JAjFoVjV5ihPfAnan_JJ0wvTBirXET5w6it8a0lh6Rk-SYoy8ULP1Hmu&typo=1
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.midrange.com%2fmailman%2flistinfo%2fopensource&c=E,1,uBYHmU81Qy96mcQrkp2ZTHTSrCKpJv_JwvKww-zX7-bt-RfoeXxZsCY2I-heQ0vMLhQqwQ3Yl3I3uPHaicK1If_KJhCnIx7ZdZ5MMzzAd7IRgWF7ab2_ETZ9&typo=1
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2farchive.midrange.com%2fopensource.&c=E,1,Ef7XwKrl8UNXywCZycikoRG0wOWKoGWIjm0mdvQxtVZ0FtqPqDFdv7s6DlDReg0NON85nmHQIvxB9lJNfkx3Nd2TX0LgjNgFh5wG7CBBCId5jw,,&typo=1
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.midrange.com%2fmailman%2flistinfo%2fopensource&c=E,1,hLrdXpwVcHSNu3Mt4LoVVIJcRkGeXe8FaN4vqYYQZkOzCx2nRu7H6LUQVeC8ggyE8Qe7218_YH6Z20apu9ndklSA2tWmJWNjlaUc81pVlv4,&typo=1
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2farchive.midrange.com%2fopensource.&c=E,1,nRm1If5Rvc3scEee9cL4k17q0UPi8_sZ5Dtg7eVPvCqGx0TN7lFLTAVufq514ib80pBSBZ7SIikzcd44IIHShFQMkXiTkkpWxqfEHbGffg4U&typo=1
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.midrange.com%2fmailman%2flistinfo%2fopensource&c=E,1,_8zvajAC8bMFjVdvOEMk6SxXTzw48u1mTsD4B4CJRnLaHW6DFBxVQQbL3s0OINUH2Kx6v5psJa3ybtAVihUgh95zOetYZk6OOqy43Z-1F8ck0qgDIYhP0mn3lw,,&typo=1
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2farchive.midrange.com%2fopensource.&c=E,1,j7VSUhJOzerwU9s5iLAYS2dHdeL76NoilAhVNiTYcNydCzuZvIC8Qvhva_76lLYa1_zl87swYRcboP_OPbs4R078_hYq50WRWIN_Y5c9&typo=1
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
As an Amazon Associate we earn from qualifying purchases.