Well you're not really reading from stdout per-se. Think of it as the output stream from your node app back to the caller which is almost like doing a call/parm across the ILE-Pase/Qsh boundary. I've used this technique for a long time.
And yes it's already translated to EBCDIC when you get it so nothing special on that front.
If you're doing a JWT and it's base64 encoded or other readable text the translation from EBCDIC/ASCII both ways is automatic. At least that's been my experience.
Easy to use from RPG or CL:
RPG or CL calls CL command that runs QShell/Pass Command (Node app, Python app, Java app, whatever) which outputs it's results via STDOUT and then returns.
Then RPG simply opens the OUTFILE PF, reads to EOF and processes the return data.
Your Node app could output an XML or JSON chunk, token text or whatever to STDOUT and then process it immediately from an RPG app.
Both the NODE CL command an QSHEXEC commands can write STDOUT to IFS, OUTFILE, spool file or outfile. I particularly like the spool file because I can then essentially create a joblog from a QSH/PASE call result as well. I recently used this technique when I created a Python secure FTP client app and wanted a log of the results but from a traditional IBMi job stream.
Anyway one more way to do things 😊
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
------------------------------
message: 3
date: Fri, 28 Feb 2020 12:42:13 -0600
from: B Stone <bvstone@xxxxxxxxx>
subject: Re: Best way to monitor for Running Node server on IBM i
cool, I'll check it out... but a web service just seems easier especially
since this project involves JWTs and I don't need to worry about
EBCDIC/ASCII this way (maybe I don't with your app either... I will check
it out though... reading from stdout doesn't sound fun but who knows!)
As an Amazon Associate we earn from qualifying purchases.