Ouch!  I don't think I ever noticed this before:  PREDSELECT "terminates
as soon as its primary input is severed."

  pipe (end /) literal OK GO|a:chop 2|b:predselect|cons/a:|b:
  OK
  Ready;

but:

  pipe (end /) literal OK GO|split|a:take 1|b:predselect|cons/a:|b:
  Ready;

I was already playing games with COUNT on the alternate to try to catch
an unmatched last record at EOF.  I suppose I could feed the same final
trigger record back into the primary to keep it connected:

  (end /) ... 
    | feedback: fanin
    | match: predselect
    | ...  (matched)
    / ...
    | count: count lines
    | match:
    | ...  (unmatched)
    / count:
    | countdup: chop 0
    | match:
    / countdup:
    | feedback:

But that seems awfully cryptic and convoluted.

In the case at hand, I have just one record on the primary, and there
may be records before it on the alternate that I don't care about.  I
just want to know whether there are any records *after* it on the
alternate--and, actually, I only want output if there *aren't*.  I guess
COUNT|JUXTAPOSE would do the job a little more simply:

  (end /)
    | nomatch: juxtapose
    | ...  (unmatched)
    / ...
    | count lines
    | pick w1 == '0'
    | chop 0
    | nomatch:

Anybody got a more straightforward way?

¬R

Reply via email to