Yes .. I though of that and we need to insure someway before reading that "this 
is the file created by last run of the tool" and scenarios that write fails, 
read fails and process abort before it has to create the file.

Regards,
Prakash


----- Original Message ----
From: Thomas Hruska <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, February 1, 2008 7:28:23 PM
Subject: Re: [c-prog] Re: Insert record in text file

Satya Prasad wrote:
> Well this is a specific requirement and our objective is that we need to 
> write a restart able batch that should pick from where it left processing 
> records last time
> 
> My intention is that to mark all the processed records by a # delimiter 
> either at the end or beginning of record so that next time I would ignore if 
> that delimiter is present.
> 
> Regards,
> Prakash

You should have said this at the start. Your problem is actually quite 
simple. Use a secondary file and write the "record" number to the 
second file after you complete processing of each "record" in the first 
file. So, read record from first file, process data, seek to the 
beginning of the second file, write row number, flush data. Repeat 
until all records have been processed.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task. Stay on task.

http://www.CubicleS oft.com/MyTaskFo cus/





      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

[Non-text portions of this message have been removed]

Reply via email to