On Monday, 11/28/2005 at 07:41 CST, Alan Ackerman <[EMAIL PROTECTED]> wrote: > Simplifying, the code that is reading the file issues: > > parse value stream(ifn ift ifm ,'c','open READ') with ok2 handle2 > say 'FILE SIZE: ' lines(ifn ift ifm ) > FILE SIZE: 204430 <== Count from the OLD file > do while lines(ifn ift ifm ) /= 0 > X.1 = linein(ifn ift ifm) > recsin = recsin + 1 > if substr(X.1,1,4) = 'EOF ' then signal endofjb > recsout = recsout + 1 > end ...snip...
Rather than calling lines() each time, try just linein() until X.1 is null. That avoids an extra API call per record. I think the in-band way to determine the size of the file (as opposed to the number of unread records) is to use stream(ifn ift ifm, 'c', 'query size'). If you're really interested in solving the mystery of lines(), open a PMR so our SFS experts can look at it. Alan Altmark z/VM Development IBM Endicott
