I have a pipeline collecting return codes from CP, COMMAND, and CMS, and
I want to shut the whole thing down when the primary output disconnects
(as if the alternate outputs weren't connected).  I thought of putting
COUNT before the primary output and using its output to trigger a GATE,
but I ran into two problems:

* COUNT seems to disconnect its primary input before writing to the
  alternate.  So I may wind up processing one record too many on the
  primary before the GATE is triggered.

* If I use GATE to disconnect the stream with the return codes,
  there's nothing to control whether it closes before or after the
  last return code is written.

So I may wind up losing the last return code, or I may wind up with the
return code from the *next* command.  Is there a right way to do this
without resorting to a loop in REXX?

¬R

Reply via email to