D'oh! Very nice ... I had used a gate as well, but not this elegantly.

On 7/17/07, Rob van der Heij <[EMAIL PROTECTED]> wrote:

On 7/17/07, Bob Cronin <[EMAIL PROTECTED]> wrote:

> The output should be stored in a stem. The stem should have all the
userid's
> in it, unless BOB was one of them in which case it should only have one
> entry, the one for BOB.

This begs for 'gate'   Something like this:
  \ *:
   | f: fanout
   | locate ,BOB,
   | g: gate
   | i: fanin 1 0
   | *:
   \ f:
   | buffer
   | g:
   | i:

For those who need more than a hint on this. The secondary output of
fanout collects all records in a buffer while the primary output is
scanned for the required key. When the key is found, the gate is
closed and only the trigger record is passed to fanin. When the key is
not found in the stream, there is no trigger, the gate is never
closed, so the buffer is emptied through the gate in the secondary
input of fanin.

PS One point on your apprentice plumber exam when you know why it says
"fanin 1 0"

Rob

Reply via email to