× 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.



I would think that the db2 protocol would be more efficient, and therfore
desirable. Xml is great for being expressive, precise and interoperable.
But, it's verbose and relatively slow to parse a binary protocol will be
faster.

On Thu, Oct 8, 2015, 17:54 Aaron Bartell <aaronbartell@xxxxxxxxx> wrote:

Why does it look like Toolkit for i is establishing a database connection
in order to execute a CL command?

The iToolKit for Node.js can interact with IBM i either through a generic
DB2 stored procedure or via HTTP web service call, though the web service
is merely a facade to get to the same code.

Also, if I wanted to call an RPG or COBOL program using Toolkit for i,
would this also require a database connection?

Yes. You can learn more about the code base here:
https://bitbucket.org/rangercairns/xmlservice-rpg2

You can learn more about the high-level concepts here:
http://yips.idevcloud.com/wiki/index.php/XMLService/XMLService

Would the RPG or COBOL programs have to be stored procedures?

They (RPG and COBOL *PGM) are inherently stored procedures. Or more
specifically, EXTERNAL procedures. The important thing to note is you do
NOT need to change an existing RPG program for XMLSERVICE to call it. It
can call it as-is.


Aaron Bartell
litmis.com - Services for open source on IBM i


On Thu, Oct 8, 2015 at 4:42 PM, Kelly Cookson <KCookson@xxxxxxxxxxxx>
wrote:

I developed the node sample app found in the following document from IBM
developerWorks:


https://www.ibm.com/developerworks/ibmi/library/i-native-js-app-ibmi-with-nodejs/

The sample app executes a CL command using node's Toolkit for i. Toolkit
for i is a collection of APIs for interfacing with XMLSERVICE.

Why does it look like Toolkit for i is establishing a database connection
in order to execute a CL command? Here is the relevant code:

var conn = new xt.iConn(DBname);
conn.add(xt.iSh("system -i " + cl));
conn.run(cb);

The variable "cl" contains the CL command. It looks like the CL command
is
being executed through a database connection. Why would a database
connection be needed if Toolkit for i interfaces with XMLSERVICE to
execute
the CL command?

Also, if I wanted to call an RPG or COBOL program using Toolkit for i,
would this also require a database connection? Would the RPG or COBOL
programs have to be stored procedures?

Thanks,

Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx<mailto:kcookson@xxxxxxxxxxxx>

--
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
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 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.