On 29 November 2016 at 11:36, Offer Baruch <[email protected]> wrote:


> Thank you all for the info... but at what phase do i execute the rexx i am
> trying to trap his output?
> How does the cms or cp stages trap the output? Can't i do the same in one
> new pipe?
>

The program in my example was OFFER EXEC that contains a few "say"
statements and two CP commands.

The PIPE that I showed sets up the trap and runs the CMS commands passed to
it; in this case a single CMS command that cause the REXX program to run.
The pipeline ends when that program terminates.

You could write a new REXX program to invoke the original one, intercept
the output and pass that through a stemmed variable, for example.

/* */
address command 'PIPE literal OFFER | starmsg *msgall | substr 17-* | stem
resp.'
do i = 1 to resp.0
   whatever resp.i
end

But you would be better off to modify your tools to make it more suitable
for usage in a pipe (and not prompt for input or things like that).

Rob

Reply via email to