[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



I have an interface file that also has to contain the number of records
in the header.

This may not be very efficient - but I do my select one time just to get
the count - write the header and then I have another procedure with the
same select and write to the file.  I then compare the count I got with
the actual number written.  If they are not the same, it prints an error
message.

Hope this helps.  I would be interested in hearing if someone else has a
better way.

Kathy

Bruce Weinstein 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 WeinsteinE-mail:
> bruceweinstein@canada.com