[mod.computers.vax] VAX/VMS

02335@UWAV4.BITNET (09/10/86)

I'm writing a little program that needs to know the number of records in
a standard ascii file on a VAX running VMS 4.4.  I am reading until EOF
and counting them now, but I would like a faster way if possible.

Thanks in advance,

Tony Andrea

Sierra Geophysics, Inc.
Kirkland, Washington

BITNET:      02335 at UWAV4
ARPA/CSNET:  02335%uwav4.bitnet@wiscvm.arpa

Pyoung.pasa@XEROX.COM (09/14/86)

For a file of fixed length records you can specify a user-open routine,
request xabfhc on $OPEN, and calculate the number of records in the
file. I don't know of any way to get the number of records in a file of
variable length records such as a text file.

Phil Young

LEICHTER-JERRY@YALE.ARPA (09/14/86)

    I'm writing a little program that needs to know the number of records in
    a standard ascii file on a VAX running VMS 4.4.  I am reading until EOF
    and counting them now, but I would like a faster way if possible.
No record is kept of the number of records in a "standard ascii file", which
I take to mean a file with variable-length records (so that you can't just
look at total size and divide by the length of a fixed record).  What you are
doing is the only after-the-fact approach possible.  (If you are the one
writing the file, you can of course keep track yourself and store the infor-
mation away.)
							-- Jerry
-------