× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Doug,

That's basically what I am doing. I was going to "reserver" spaces at the
beginning of the file such as "COUNT=_____________,
TOTAL$=_________________". I was then going to fill in the "_" with the
values.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Douglas Belcher
Sent: Tuesday, May 05, 2009 1:21 PM
To: RPG programming on the IBM i / System i
Subject: Re: open ifs file for update

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

Replies:

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

This mailing list archive is Copyright 1997-2024 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.