[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Modify record in flat file
Couple of possibilities:
1. Write data to a temporary database table keeping the
count. Then generate the flat file from the temporary table.
2. Write the detail data out to one flat file and the header out to
another. Use a DOS copy command to concatenate them:
copy header.txt + detail.txt alldata.txt (I don't know the UNIX
format).
3. Write all the detail data out to a flat file. Then write
the header to a new file, read the saved detail data in and then write it
back out to the new file.
At 03:03 PM 8/24/99 -0400, you wrote:
I have a SQR
that writes to a flat file. Problem is the first record in the file
is supposed to be a header record containing general info. One item
it is to contain is the number of records in the flat file. I do
not know this value until the very end of running this SQR. What I
need to be able to do is create my flat file with the header record as
row 1, then when the SQR has finished writing to the file, go back and
update the header record with the number of records in the
file. My question is can I go back and update the header row (Row
1) after writing all the records to the file first?
Your help would be
appreciated.
Bruce Weinstein
E-mail: bruceweinstein@canada.com