I used the instructions here: https://www.ibmsystemsmag.com/IT-Strategy/08/2019/ODBC-Driver-for-IBM-i <https://www.ibmsystemsmag.com/IT-Strategy/08/2019/ODBC-Driver-for-IBM-i>

I was setting up for php but the ODBC stuff is the same.

On Jun 3, 2020, at 11:57 AM, Steve M via OpenSource <opensource@xxxxxxxxxxxxxxxxxx> wrote:

Great, Calvin, I love the idea. Have an example for me?


-----Original Message-----
From: Calvin Buckley <calvin@xxxxxxxxxx>
Sent: Wednesday, June 3, 2020 10:33
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxxxxxxxx>
Cc: Steve M <txpenguin1@xxxxxxxxxxx>
Subject: Re: [IBMiOSS] Node/Express/DB2

Why not use ODBC instead of JDBC? The Db2i driver supports PASE.

On Wed, 2020-06-03 at 10:26 -0500, Steve M via OpenSource wrote:
Okay, I surrender. The divot on my desk, matching my forehead, is
getting quite deep from repeated pounding.

I am sure I am missing something very simple here, but for the life of
me I can't figure out what.

Developed a project, on my PC, using Node and using NPM installed
Express, Path, JDBC and it works fine being locally hosted and
accessing data on DB2.

Created a new folder on my IFS, then went to Call QP2Term and
navigated to the folder. NPM INIT worked fine. NPM install of
Express and Path, no issues.

Tried to NPM install JDBC and received a failure, as near as I can
tell, from this: as400 Error:
`node-gyp rebuild`

It seems to be related to a child-process rebuild during the install.
After being unable to resolve this issue, I then found an example
which was using

"var db = require('/QOpenSys/QIBM/ProdData/Node/os400/db2i/lib/db2');

I looked in my IFS and have nothing like that. My Node installation
appears to be here: /QOpenSys/pkgs/lib/nodejs8

I am sure I have gotten myself all twisted up somewhere.

Before trying to resolve all of these issues the question is this -
what is the best/proper way for developing on your PC and Node/Express
application to access DB2 that will work both when hosted with
LocalHost during development and with your IBM i hosting during actual
use? I would prefer not to develop in the IFS, but rather develop
local on my PC and then copy over the files once they are working, or
is that bad practice? Should I just be developing directly within the

As for my software, I have been using JetBrains IntelliJ (my
preference) for
development and also using Visual Studio Code (to learn something
new). Any recommendation on better or worse on those? Less concerned
with this part and more with my ability to access the DB2 data.

Thanks for any/all the help. First time posting out here on
OpenSource as I am venturing into new arenas of utilization of our IBM
i. Long time RPG and COBOL and Java developer trying to negotiate the
OpenSource world.


Steve Meisinger

This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/opensource.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.