This works for me:
Signal on novalue
numeric digits 12
Address COMMAND
'PIPE (end \ name T)',
'\literal x',
'|literal abc',
'|l:locate /*/',
'|g: gate',
'|hole',
'\l:',
'|buffer',
'|g:',
'|cons'
Exit RC
On 12/08/2017 11:36 PM, Rob van der Heij wrote:
Sorry, I missed some of the negates in your question. Yes, make it a "gate"
rather than "dam" because you want to cut the pipe when the trigger is
found. To get the trigger on its own, you could do something with fanout to
feed it to a "fanin" just before the end. Or use "strliteral ifempty ,*, "
Sir Rob the Plumber
On 8 December 2017 at 23:05, James Vincent <[email protected]>
wrote:
If there is no * I get no records. If there is a * I get all the records
BUT the *. It seems close...
I was messing with GATE and thought I was on to something, but still could
not make it work.
-- *James Vincent*
-- Calendar: http://tinyurl.com/JSVCalWeek
On Fri, Dec 8, 2017 at 4:45 PM, Rob van der Heij <[email protected]>
wrote:
So that means you need to buffer possibly all of your input records
before
you know you don't want them? You can trigger 'dam' to decide whether you
let the data pass, something like this:
callpipe (end \)
\ i: fanin | d: dam
\ *:
| x: locate ,*,
| take
| i:
\ x:
| buffer
| d:
| *:
Assuming you want to discard the record with the * in it, if not you'd
use
a 'fanout' to retain the full copy.
But I have a feeling you'd end up with different requirements when you've
thought this through.
Sir Rob the Plumber
On 8 December 2017 at 20:58, James Vincent <[email protected]>
wrote:
I am hitting a wall trying to figure out how to do this elegantly and
am
betting someone knows.
I have a pipe of records and want to select all the records only if "*"
is
not in the stream. If "*" is in the stream, then only select that one.
For instance:
abc
123
*
Result should be: * But if * is missing, then the result is abc and
123
Any thoughts?
-- *James Vincent*
-- Calendar: http://tinyurl.com/JSVCalWeek