Kalvin Weaver
asked on
How to call HTTP from RPGLE
I want to call an RPGLE program, display a customer order and display the tracking number. I'd like to use MOUBTIN to click on the tracking number, call an HTTP with Federal Express, pass the tracking number and pull up a screen that shows where the customers package is in process. I cannot find where/how to do the HTTP call.
What IBM i OS version are you running?
Here are a few alternatives:
IBM supplies a (free) set of IBM i DB2 functions that make it very easy to access web services from SQL (which you can easily embed in RPG, of course):
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/New%20HTTP%20functions%20added%20to%20SYSTOOLS
If you don't want to go the SQL route, Scott Klement's HTTPAPI simplifies the process of using HTTP from RPG:
https://www.scottklement.com/httpapi/
For simple requests/responses, you can also use cURL. The first link is from an older EE thread. The second link shows you how you can get cURL as part of 5733-OPS Open Source licensed program.
https://www.experts-exchange.com/questions/28092413/Make-a-call-to-a-URL-from-iSeries.html
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/Open%20Source%20Technologies
To use cURL to access a web service, you would generally submit the request, and redirect output ti an IFS file, then process the IFS file.
https://www.mcpressonline.com/programming/web-languages/techtip-talk-to-the-internet-with-curl
IBM supplies a (free) set of IBM i DB2 functions that make it very easy to access web services from SQL (which you can easily embed in RPG, of course):
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/New%20HTTP%20functions%20added%20to%20SYSTOOLS
If you don't want to go the SQL route, Scott Klement's HTTPAPI simplifies the process of using HTTP from RPG:
https://www.scottklement.com/httpapi/
For simple requests/responses, you can also use cURL. The first link is from an older EE thread. The second link shows you how you can get cURL as part of 5733-OPS Open Source licensed program.
https://www.experts-exchange.com/questions/28092413/Make-a-call-to-a-URL-from-iSeries.html
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/Open%20Source%20Technologies
To use cURL to access a web service, you would generally submit the request, and redirect output ti an IFS file, then process the IFS file.
https://www.mcpressonline.com/programming/web-languages/techtip-talk-to-the-internet-with-curl
ASKER
7R3M0
ASKER
Gary, we are looking at a GUI interface to overlay our green screens. These seem to have what I need as far as calling an HTML. Have you ever experienced a GUI green screen eliminator, and if so, do you have a suggestion.
Ok, that's a whole different subject - you should open a new question.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.