XMLSERVICE uses stored procedures for its interface. Even when using the REST interface for XMLSERVICE, it simply calls the stored procedure interface within the XMLCGI program. For more info on this see here http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=10092549



Brian May
Solutions Architect
Profound Logic Software
http://www.profoundlogic.com
937-439-7925 Phone
877-224-7768 Toll Free
  

The IBM i Modernization Experts
www.profoundlogic.com
             


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kelly Cookson
Sent: Thursday, October 8, 2015 4:43 PM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Why does node's Toolkit for i, use a database connection to execute CL commands?

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.


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.