On 2/22/2013 4:25 AM, Rob van der Heij wrote:
> (even though his "putfiles" has an "append" option to accumulate
> records, the overhead may be significant).
My old DISKANY REXX does it this way (where OUTPUT may be either DISK or
DISKUPDATE, depending on the args):
'peekto fileid'
Do while rc = 0
fileid = left(fileid,20)
'addpipe (end /) *:' ,
'| a: not fanout' ,
'| b: lookup 1.20 detail' ,
'| not chop 20' ,
'|' output fileid ,
'/ a:' ,
'| take 1' ,
'| b:' ,
'| *.in:'
If rc = 0 then 'peekto fileid'
End
This will fail if you've got the same file specified more than one way.
Not too hard to fix, but I never used it in a context where I'd run
into that so I never worried about it.
¬R