1. "Rather than calling lines() each time". 

The code was taken directly from the REXX/VM Reference:
Chapter 7. Input and Output Streams
Examples of Input and Output (page 187)

/* This routine copies the stream or file named by */ 
/* the first argument to the stream or file named */ 
/* by the second, as lines. */ 
parse arg inputname, outputname

do while lines(inputname)>0 
  call lineout outputname, linein(inputname) 
  end 

2. "try just linein() until X.1 is null"

That's useful to know. Is it documented anywhere? I could not find it. I 
could find nothing at all about "end of file" in the REXX/VM reference. 
The REXX/VM User's Guide says "LINES(fileid) = 0" exclusively when it 
discusses end of file.

3. "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')."

What's "in-band"?

On Tue, 29 Nov 2005 12:45:58 -0500, Alan Altmark <[EMAIL PROTECTED]> 
wrote:

>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
>=========================================================================

Reply via email to