Thanks for the responses. I finally figured it out. I needed to install the windows build tools:
Npm install windows-build-tools
I must say I am underwhelmed by the node-jt400 module.
1. Not very much in the way of documentation. Google searches turned up a lot of pages with people saying they had the same problem, but offered no fixes or offered suggestions that did not fix the problem. No commercial support available as far as I know.
2. node-jt400 only hides Java from you as long as no errors occur; then you're digging into Java call stacks.
3. I was able to copy a small text file (29 characters) from one IFS directory to another IFS directory. But when I tried to copy a 5MB text file from one IFS directory to another IFS directory, the result was an empty file in the second directory. No error messages or call stack to dig into or anything.
4. The examples provided on node-jt400 npm page for querying a DB2 file and calling a program did not work for me. I have some kind of JDBC error going on with the DB2 query. I'm trying to figure out how to pass the library list for the program. Just passing the program name returns an object not found error despite my user IBM i being set. Passing library/program returns a "not the correct length" error. I'm going to try /QSYS.LIB/MYLIB.LIB/MYPROGRAM.PGM when I get the chance.
I am also a little concerns about scalability if I'm putting Java into the mix. In theory it shouldn't slow down the event loop too much. It passes off the IBM i connection and work to the worker threads. But does Java create overhead opening connections to the IBM i? And it took a second or two to get a return saying the pool was finally closed (i.e., the IFS file was copied) even though the file was only 29 characters long. So I wonder about scalability.
I'm investigating other options.
Thanks,
Kelly Cookson
IT Project Leader
Dot Foods, Inc.
217-773-4486 ext. 12676
www.dotfoods.com<
http://www.dotfoods.com>
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Tim Fathers
Sent: Friday, March 16, 2018 3:26 AM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: [EXTERNAL] Re: [WEB400] What forum is best for a JTOpen and Node question?
What errors are you getting?
Did you actually create a new Node project? You need to do this first using "npm init" inside the folder where your project files are/will be, this will create a "package.json" file for you. I would avoid using spaces in the the folder name, it can cause problems with some Node utilities. If your version of NPM is less than 5.0.0 you should also add "--save" when you install a dependency "npm install node-jt400 --save" (as of version 5 it saves by default), this will update your package.json with the new dependency.
________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx>> on behalf of Kelly Cookson <KCookson@xxxxxxxxxxxx<mailto:KCookson@xxxxxxxxxxxx>>
Sent: 16 March 2018 01:31
To: Web Enabling the IBM i (AS/400 and iSeries) (web400@xxxxxxxxxxxx<mailto:web400@xxxxxxxxxxxx>)
Subject: [WEB400] What forum is best for a JTOpen and Node question?
Hi,
I'm not sure what forum is best to ask this question.
I have node running on a Windows machine. I want to install the node-jt400 module (
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fnode-jt400&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=Y1ojQ2H68I0D8EWZR%2FBia2%2FSIS5g9KCsktJgAAoJ584%3D&reserved=0<
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fnode-jt400&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=Y1ojQ2H68I0D8EWZR%2FBia2%2FSIS5g9KCsktJgAAoJ584%3D&reserved=0>).
* The node-jt400 module allows JS scripts to access the JTOpen Java classes.
* The JTOpen Java classes allow remote access to IBM i resources.
So, a JS script running in node on Windows can call an IBM i COBOL program or update a DB2400 file using the JTOpen Java classes under the covers.
I know the install command (npm install node-jt400). But I'm getting errors.
I'm not sure WEB400 is the right place to get help on this. If not, can someone please recommend a better forum?
Thanks,
Kelly Cookson
IT Project Leader
Dot Foods, Inc.
217-773-4486 ext. 12676
https://eur01.safelinks.protection.outlook.com/?url=www.dotfoods.com&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=rkZF5J8IVwMHjUJ96PmgSqA3RGBEVSVpt%2FhKGbJhLkQ%3D&reserved=0<
https://eur01.safelinks.protection.outlook.com/?url=www.dotfoods.com&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=rkZF5J8IVwMHjUJ96PmgSqA3RGBEVSVpt%2FhKGbJhLkQ%3D&reserved=0><
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dotfoods.com&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=LCmff%2BcPcQSeML%2BggDp%2Biw1kQ9N0o2fNCSSkIK5MQ4o%3D&reserved=0<
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dotfoods.com&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=LCmff%2BcPcQSeML%2BggDp%2Biw1kQ9N0o2fNCSSkIK5MQ4o%3D&reserved=0>>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=byZ5yirxc3flde88h4pvfzNOZRODItI9AyimmZF7yw0%3D&reserved=0<
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=byZ5yirxc3flde88h4pvfzNOZRODItI9AyimmZF7yw0%3D&reserved=0>
or email: WEB400-request@xxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=XIFFTXIweBE9hcBQ4%2Bd%2ByEtli2qTp04CDB1KSmuBnKs%3D&reserved=0<
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&data=02%7C01%7C%7Cee331ad4a0a7400bab5808d58ad55fb5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636567571395935978&sdata=XIFFTXIweBE9hcBQ4%2Bd%2ByEtli2qTp04CDB1KSmuBnKs%3D&reserved=0>.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/web400<
https://lists.midrange.com/mailman/listinfo/web400>
or email: WEB400-request@xxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/web400<
https://archive.midrange.com/web400>.
As an Amazon Associate we earn from qualifying purchases.