From: <hp...@we...> - 2022-06-13 01:12:25
|
Hi! Am 12.06.2022 um 17:55 schrieb Rony G. Flatscher: > Learned from René that it is possible to use external programs, > also Rexx programs in NetRexx pipes like: > > pipe literal curl http://example.com | command | cons > > So you can write oo/Rexx filter programs to be used as NetRexx > pipe stages. That is a very handy hint, thank you René and Rony for forwarding it. > The oo/Rexx filter (reading from stdin, writing to stdout) would > have to be written like: > > do until line="" > parse pull line /* read from stdin */ > ... do something with line and if you want to pass on data > do ... > say editedData /* writes to stdout */ > end > > alternatively, one could write the Rexx filter also as (preferable): > > signal on notready /* raised if stdin gets closed */ > do forever > parse linein line > ... do something with line and if you want to pass on data > do ... > say editedData /* writes to stdout */ > end > notready: /* label to jump to */ That looks promising :) > If you also want to write to stderr then you could either do that > in classic Rexx style with "call lineout stderr,data" or in ooRexx > ".error~say(data)". > > You may want to look through these slides: > <https://wi.wu.ac.at/rgf/wu/lehre/slides/BusinessProgramming/060_ooRexx_commands_V14.pdf>. Rony! I took the chance and browsed also through the other sets of slides available there -- and besides 2..3 things about REXX I learned two facts about i) Prof. Rony G. Flatscher that ii) he was part of the team negotiating with IBM about ooRexx. So I get help from the top-notch expert himself. Hope your students are less demanding than I might be as mainframe dinosaur. Best, M. |