Re: Rewrite Twice?



On 31 May 2006 08:14:54 -0700 dmckeon@xxxxxxxxxxxx wrote:

:>I have a situation where I'm processing a request that comes in a
:>sequential file. At the end of processing, we rewrite the record so we
:>know processing is complete. I'm now adding some logic and want to
:>perform a rewrite in the middle of processing in case the program
:>abends in the middle, we can recover properly. Unfortunately, the
:>second rewrite then fails. Is there any way to rewrite a record twice
:>or do I need to close the file and re-read it back to the point I was
:>at?

Can you change it so that it isn't a sequential file?

Otherwise you are out of luck.

Also, be aware the issuing the WRITE does not guarantee that the record is
firmed to disk, especially when there is an abend. The record may be in a
buffer. A CLOSE will force the write. There may be other tools provided by
your COBOL.

--
Binyamin Dissen <bdissen@xxxxxxxxxxxxxxxxxx>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
.



Relevant Pages

  • Rewrite Twice?
    ... I have a situation where I'm processing a request that comes in a ... sequential file. ... we rewrite the record so we ... I'm using Microfocus Workbench on Windows XP. ...
    (comp.lang.cobol)
  • Re: Rewrite Twice?
    ... sequential file. ... we rewrite the record so we ... second rewrite then fails. ... I'll just close the file and re-read it. ...
    (comp.lang.cobol)
  • Re: Rewrite Twice?
    ... sequential file. ... we rewrite the record so we ... second rewrite then fails. ... The Byte-stream File Routines may be used or, ...
    (comp.lang.cobol)