Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Rodrigo Bernardo
575
Views
8
Comments
Calling a RPG Program on IBM iSeries/AS400
Question
HI,
Does anyone have an idea how to call an RPG Program API on AS400/iSeries.
Thanks.
Curt Raddatz
I'm no expert in AS400 but I do have lots of experience with other mainframes. The first question you need to ask yourself is what is the use case for this. RPG programs, generally speaking, are not well suited to being called by an outside entity. If what you are really trying to do is get at the data that the RPG program uses, you would have a much better chance at success. For example, let's assume that the RPG program works against a DB2 database. It just so happens that there is a component in Forge that will let you access this database, assuming appropriate configuration on the AS400 to allow external access. Once you can read the database in Outsystems the rest is easy.
Hope this helps,
Curt
Rodrigo Bernardo
Staff
HI Curt, Thanks for your reply. Unfortunetly DB2 database cannot be access, the only way to access the data is to call an RPG program.
It is an old system, and I am trying to get data from it with not much options.
I only see the option to built an extension in .NET to call the RPG program. I was hoping someone might have done something like that before.
Curt Raddatz
So even if you create a .Net extension, how are you getting to the mainframe and specifically that RPG program, Web Services (SOAP, REST) or is there a specific API that is documented someplace? Generally mainframe systems are very protective of outside access so you really need to determine how you can communicate with the AS400 to determine what the best solution would be. Good luck!
Rodrigo Bernardo
Staff
Should be Something like this.
https://timtrott.co.uk/calling-ibm-iseries-rpg-programs-api-calls/
George Jeffcock
This topic interests me greatly.
I enjoyed https://www.outsystems.com/company/events/web/mobilizing-legacy-systems/
But disagree with the approach of going straight to DB2 by passing the business logic in the form of RPG functions, Yes if you are lucky that the ibmi application was built using data-centric principles then cool, but most likely the application was written program centrically and you cant bypass the rpg tier.
So how can you invoke the RPG tier? Publish using Integrated Web Services for IBM i but is there a way of consuming RPG functions.....
Regards
Rodrigo Bernardo
Staff
Hi George,
I have done this in the past through an extension in Integration Studio.
IBM iAccess client provides a CWBX library that you can use to call RPG Programs, it is available for C# and Java. Similar to what is described here https://timtrott.co.uk/calling-ibm-iseries-rpg-programs-api-calls/.
You will need to use that dll or jar and create an extension in Integration Studio to call RPGs.
Regards,
George Jeffcock
Hi Roland,
Many thanks for your reply and a useful option to leverage existing ibmi functionality.
After further thought feel its best not to expose this way but through IBMi Integrated Web Server as Rest/SOAP services.
But still an option all the same that could be offered.
Regards
George Jeffcock
IBM i and .Net Connectivity With XMLSERVICE
https://www.itjungle.com/fhg/fhg020916-story01.html
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...