Page 1 of 1

calling Nodejs script from RPG with I/O parms

Posted: Thu Apr 28, 2022 3:14 am
by paksilv
Hi,
Is there a way to call a NODEJS script (via QSH) in a RPG/CLP PROGRAM by passing input/output parameters?
Thanks.

Re: calling Nodejs script from RPG with I/O parms

Posted: Thu Apr 28, 2022 5:30 am
by Scott Klement
You mention QSH. Does that mean you're running plain Node.js (i.e. you are not using the Profound.js framework)?

With Profound.js, you can create a "proxy program" and call it with the normal CALL command.

With plain Node.js, you can pass input-only parameters on a program call. You can not return output parameters, but instead would want to use STDOUT to get back output. Or better yet, set up some REST APIs and call those.

Re: calling Nodejs script from RPG with I/O parms

Posted: Thu Apr 28, 2022 8:32 am
by paksilv
Yes, we're running plain Node.js. At the moment we only have Profound Ui but we are experimenting with Node.js.
Thank you for your suggestion.
Bye.