Tim,

I was thinking that Scott might reply so I waited until he did to tell you
what I have done in this situation. My requirements are that the first
"record" has a field that has a count of "records" in the file. So I don't
have that number until I write my last bit of stream data. What I decided
to do was to generate two stream files, one that would contain the first
header "record" and another to contain all the rest of the detail data. The
program does it's processing, outputs the second file, and accumulates the
"record" count. At the end of the process I create the file with the first
header "record" with the "record" count, close and open the file with all
the other detail "records", read and append those "records" to the header
file, close both files, and unlink the detail file. Check out Scott's IFS
tutorial for all the information you need.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.