× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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

Thanks,
Steve

-----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:
java@0.12.1
<mailto:
java@0.12.1
install:
`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
this:

"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
IFS?



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.



Thanks,



Steve Meisinger







As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

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.