On Tue, Jun 9, 2009 at 3:24 AM, Glenn Knickerbocker<[email protected]> wrote:

> What I really want in the case at hand is to take two files, and pad the
> shorter one to contain as many records as the longer one.  I happen to
> know the lengths in advance, but it would be nice to have a way that
> didn't require that.

If you really talk about files, then reading both files seems to be
overkill even when they are so small (or that 10 was also just the
example and might be 10,000)  So I assume you're talking about streams
in the pipeline that remain in the pipe, right? It really depends on
what is processing the records. If you're handling them apart,
something like the following would do the trick:

'PIPE (end \)',
   '\ literal aap noot mies wim zus',
   '| split',
   '| o1: fanout',
   '| copy',
   '| s1: spec 1-* 1 select 1',
   '| insert ,0:, | cons',
   '\ literal liesje leerde lotje',
   '| split',
   '| o2: fanout',
   '| copy',
   '| s2: spec 1-* 1 select 1',
   '| insert ,1:, | cons',
   '\ o1: | s2:',
   '\ o2: | s1:',

So we have two paths with cross-over connection with the "fanout" and
the "spec" stages. Since "spec" uses "stop anyeof" by default, it will
feed in null records when one of the streams goes eof early.

Rob

Reply via email to