On Nov 28, 2007 12:48 PM, Shimon Lebowitz <[EMAIL PROTECTED]> wrote: > So, here is where we get to PIPES again. > Is there a way to tell my pipe to split off the output > to a different filename after N records?
You could probably craft some plumbing that uses fanout / juxtapose to prefix each input record with the output file name (with some join 499 | spec number .. ) and then use Kris' putfiles stage. Or for this simple case, just use a sipping pipeline like this: signal on error do i = 1 to 9999 fn = 'PRTL'right(i,4,0) 'OUT A' 'peekto' 'callpipe(end \) *: | take 500 | >' fn end error: return rc * ( rc <> 12 ) > So, how could the original pipe have done this? > Or would it be more trouble than it's worth? I cannot look into the performance characteristics of your system (well, I could if you had our software ;-) but my guess is that the sipping pipeline will be more expensive than a bunch of COPYFILE invocations. When you also have to do things to the records in these files, then there could be an advantage to keep the data in the pipe. Rob -- Rob van der Heij Velocity Software, Inc http://velocitysoftware.com/
