|
The new node v4 comes with a "switcher" shell script. This allows
switching between v4 and v0.12
--
Bryan
On May 11, 2016, at 5:29 PM, Aaron Bartell <aaronbartell@xxxxxxxxx>wrote:
later
Brian,
I am getting the same error. I have installed Node v4 and will IPL**
tonight.nature
** Quite the inconvenience to IPL for PTFs that are fairly simple in
(though I could be completely ignorant here). There's got to be a betteroperate
way.
Best practice suggestion for others adopting open source langs on IBM i.
Use tar to save the lang directory and untar to a different one and
off that new directory.PATH=/opt/freeware/bin:/QOpenSys/node/$1/Node/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
--- These steps ~should~ be accurate :-) ---
$ node -v
0.12.9
$ cd /QOpenSys/QIBM/ProdData
$ tar -cvf /QOpenSys/node/node-0.12.9.tar Node/
$ cd /QOpenSys/node
$ tar -xvf /QOpenSys/node/node-0.12.9.tar
Then have a shell script to easily switch between versions.
----node_ver.sh----
export
export LIBPATH=/QOpenSys/node/$1/Node/binbrian.garland@xxxxxxxxxx>
And invoke it like this:
$ . node_ver.sh node-0.12.9
Aaron Bartell
litmis.com - Services for open source on IBM i
On Tue, May 10, 2016 at 8:31 AM, Brian Garland <brian.garland@xxxxxxxxxx
wrote:
Here is a test program that demonstrates the error. With the db.conn
statement in there you will get the HY010 error. If you comment out the
db.conn it will work.
var db = require('/QOpenSys/QIBM/ProdData/Node/os400/db2i/lib/db2')
var xt =
require('/QOpenSys/QIBM/ProdData/Node/os400/xstoolkit/lib/itoolkit')
var conn = new xt.iConn("*LOCAL")
db.init()
db.conn("*LOCAL")
// set the user and password to test
// the console will show "success:false" or "success:true"
validateUser("username","password")
function validateUser(userName, password){
var pgm = new xt.iPgm("QSYGETPH",{"lib":"QSYS","error":"on"})
var x
pgm.addParam(userName.toUpperCase(), "10A")
pgm.addParam(password.toUpperCase(), "10A")
pgm.addParam(" ", "12A", {"io":"out", "hex":"on"})
pgm.addParam([
[0,"10i0"],
[0,"10i0"],
[" ", "7A"],
[" ", "1A"],
[" ", "256A"]
])
pgm.addParam(10, "10i0")
pgm.addParam(-1, "10i0")
conn.add(pgm.toXML())
conn.debug(true)
function my_call_back(str) {
var results = xt.xmlToJson(str)
console.log(str)
if(results.length == 0){
console.log("success:true")
x = true
} else {
results.forEach(function(result,index){
if(result.hasOwnProperty('success')){
console.log("success:" + result.success)
x = result.success
} else {
console.log("success:true")
x = true
}
})
}
}
conn.run(my_call_back)
return x
}
On Mon, 9 May at 2:53 PM, Aaron Bartell <aaronbartell@xxxxxxxxx>
wrote:
Do you have a small/generic example for us to test?
Aaron Bartell
litmis.com - Services for open source on IBM i
On Mon, May 9, 2016 at 2:50 PM, Brian Garland <
itoolkitwrote:IBM i
I have a node.js program that is using itoolkit/xmlservice to call an
api.
If I add the db2 library anda db2 connection to the program the
intendedconnection will fail with [Error: SQLSTATE=HY010 SQLCODE=-99999 Error
occured in SQL Call Level Interface].
Any idea how to do program calls and have a DB2 connection at the same
time?
--
Brian J. Garland
Vermont Information Processing, Inc.
brian.garland@xxxxxxxxxx
--
This email and any files transmitted with it are confidential and
addressed.solely for the use of the individual or company to whom they are
senderDo not disclose, distribute, or copy this email to others outside your
company. If you have received this email in error, please notify the
listimmediately and delete this email from your system.--
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
To post a message email: WEB400@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.