calling Nodejs script from RPG with I/O parms

Use this board for starting discussions, asking questions, and giving advice on RPG programming for the IBM i platform (and predecessors.)
paksilv
New User
Posts: 11
Joined: Thu Oct 20, 2016 5:56 am
First Name: silvano
Last Name: pacifici
Company Name: VIBA SPA
State / Province: Outside Canada/USA
Country: Italy
Contact:

calling Nodejs script from RPG with I/O parms

Post 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.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

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

Post 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.
paksilv
New User
Posts: 11
Joined: Thu Oct 20, 2016 5:56 am
First Name: silvano
Last Name: pacifici
Company Name: VIBA SPA
State / Province: Outside Canada/USA
Country: Italy
Contact:

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest