RE: Call a rpg program from a node script running on an external windows or linux server
Richard Schoen <richard-DiTrGpQEJGItADg8e/3/[email protected]> Wed, 6 May 2026 13:42:08 +0000
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <DM4PR12MB526320E79BCC3A6227B36623B73F2@DM4PR12MB5263.namprd12.prod.outlook.com> |
Is the call coming in over the Internet or over a private network or VPN co= nnection ? First and foremost that's a consideration for potential exposures. = Also how much volume ? (CPU exposure and rate limiting needed to be conside= red) Since you're using node you can: -Write your own REST service with: = Node (Can use the node toolkit which uses XMLSERVICE) RPG (ILEAstic or CGI) Python Java -Use IWS to expose RPG calls as REST If on an internal/secure network you could use: -Mapepire, but your interactions would be using Web Sockets, plus it's stil= l pretty new. (limited to CL commands and SQL I believe) -Connect to XMLSERVICE over http, odbc or SSH -Connect directly via ODBC. = If external: -Are you able to llimit the IP addresses hitting the app ? -Do you have an external firewall with rate limiting ? (Cloudflare or somet= hing similar) For you if Node is your thing, creating the service in Node may be the best= option. If each call is truly a few milliseconds, you can probably make the call an= d just wait for the response sending back the PF outfile results. Hope this helps. Regards, Richard Schoen Web:=A0http://www.richardschoen.net Email:=A0richard-DiTrGpQEJGItADg8e/3/[email protected] ---------------------------------------------------------------------- message: 1 date: Wed, 6 May 2026 12:01:29 +0200 from: Luca Giammattei <[email protected]> subject: Call a rpg program from a node script running on an external windows or linux server Hi everyone, I may soon find myself in the situation in question: a web app= running on a Linux or Windows server needs to access data on the Power Ser= ver. = Obviously, this involves structured information based on a well-defined and= consolidated calculation in a business logic managed by three RPG programs= that have been doing their job effectively for 20 years. The only change w= as made about twenty years ago, and a parameter was added to the programs t= hat simply creates an PF-DTA object as an output file with this data to be = later managed. So, back to the point: what's the best way to allow a Node.js script runnin= g on a Linux (or Windows) server to connect with a specific user to a Power= Server on IBM i 7.3 or 7.5 and make a call pgm1(parm1); wait a few millise= conds for the execution time and then retrieve a database file? Has anyone = had similar experiences? Perhaps encapsulate the pgm in an SQL function? Thanks in advance to anyone who can share their experiences. -- = This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l. Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related qu= estions.