Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flushing file buffers from batch COBOL from abend

Status
Not open for further replies.

SPDJM

Programmer
Nov 14, 2002
2
US
Is there a way to capture the data in the buffer when a batch COBOL abends other than JCL disp position? Looking to create restart code and efficiencies in buffering is causing lost data. Is there a way to flush the buffers during execution of program? If so, then we have the restart capability in place.

Thanks
 
As I recall, abterm should close all pgm files at abend. Part of the close process is to empty and write the buffers for O/P files.

I may not be interpreting your post correctly. Could you explain your problem in more detail?

Regards, Jack.
 
Hi SPDJM,

If what you need is a restart functionality, then there are cleaner/proven ways to do this.

The best way is to implement "transactions". This is the equivalent of many database's BEGIN/COMMIT/ABORT TRANSACTION.

After processing each transaction, you will update a 'control file' with the latest relevant buffers, before committing the transaction.

In the event your program abends for any reason, your transactions will be protected/complete, and each time the program is executed, your restart logic will consist of reading the information in the 'control file' in order to obtain the latest processing status.

Without implementing the above, you are left with 2 options I can think of:
1. Learn to read abend dumps and suffer occasional headaches when trying to restart the program.
2. Write sophisticated 'unconventional' code and spend the next few years debugging it.

Dimandja
 
Thank you greatly for the feedback. We're already in the advanced stages of reading dumps as the process in question is a driver program with 57 called sub-programs written in the mid 80's and now receiving funding to improve response time. Basically we have an intricate process of post transactions based on nature of transaction thus the diverse sub-programs that then balance up to the master record. Master record being the summary balancing record for 'account'. There is a 3-digit key that separates and totals 'accounts' and abend can occur within the key at any account. The intention is if abend occurs on account not at key level to restart at account. The kicker is we're talking about 2-4 million accounts nightly so any down time is critical for posting and thus the focus on restart. Now in working on the commit is time associated so I was also trying to find a way to utilize the buffer which basically is busy posting the data while I'm off processing more transactions.
 
Is this process doing "update in place" processing or using a parent/child update process, or some mixture of the two. If it is strictly a parent/child update process, you might be able to reposition to the last successfully completed acct key level and begin reprocessing from there.

Please let us know if you find a "good" solution to your problem. I know this is an area of great interest to anybody working with transaction processing systems. I personally worked on an application very similar to what you described and was always bothered by the fact the official restart policy was reload and restart from the beginning. Microsoft gets away with this on the pc level(ie. uninstall and reinstall the program), but that doesn't cut it when you have large volume, mission critical business systems at stake. "Code what you mean,
and mean what you code"

Razalas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top