FYI, the SYSTOOLS functions are incompatible with Java code (just in case you make use of Java in the same jobs).
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=130541
-----Original Message-----
From: Kelly Cookson [mailto:KCookson@xxxxxxxxxxxx]
Sent: Friday, July 12, 2019 2:02 AM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Subject: [WEB400] Consuming RESTful APIs from RPG/COBOL ILE
Hi,
We are making a list of options for *consuming* RESTful APIs from an RPG or COBOL ILE program. I am hoping to get help building the list.
Here are options on our list so far:
1. HTTPFunctions in SYSTOOLS. Right now this is the top of our list, but things can change.
1. IWS. Tim Rowe recently pointed out that IWS can consume RESTful web services as well as expose them.
1. HTTPAPI utility. I found this on Scott Klement’s website (
https://www.scottklement.com/httpapi/ ).
We know how to use Node.js to *expose* RESTful APIs on the IBM i. However, if we want to consume an API from a COBOL or CL program, we only know of one way to call a Node.js script: use a QShell command. The QShell command does not appear to have a way to return data from the Node.js script. We can’t get the data from the API we want to consume. We thought about having the Node.js script consume the API and write the data into a database file or data queue, which would then be available for processing by the COBOL or CL program. But…ugh! It just seems like a clunky workaround.
We would prefer not to use PHP or Java. Nothing at all wrong with these languages. They work great. This is just a preference of our particular shop for non-technical reasons.
Thanks,
Kelly Cookson
Senior Software Engineer II
Dot Foods, Inc.
217-773-4486 ext. 12676
www.dotfoods.com
As an Amazon Associate we earn from qualifying purchases.