The COMMIT Db2 is at the heart of our checkpoint / restart strategy, and should be considered in a concurrent update logic between batch processing and real-time processing (CICS).
The problem is that the Db2 COMMIT does not process the files (input or output) nor the state of the program memory (totalizers, counters, etc.).
The question is how to synchronize the Db2 COMMIT and the COBOL CHECKPOINT which manages the files and memory.
Original Message:
Sent: Mon June 10, 2024 08:52 AM
From: Jon Butler
Subject: Looking for samples of checkpoint/restart solutions in a COBOL Db2 context with explicit commits.
Denis,
I ran into this problem many years ago, and as you discovered, you could use DFSORT (ugh!) or MVS Checkpoint/Restart by writing messages to tell you where your are in your processing. This is true not only for Db2, but for VSAM datasets as well, as no copy of the dataset is made when you do the checkpoint and the data could have been altered by another process between your checkpoint and the restart. I guess there is some reason you don't use Db2 COMMIT and ROLLBACK, perhaps with SAVEPOINTS?
As someone probably already suggested...because you say you don't have IMS at your shop...IMS Symbolic C/R would probably be your best bet.
------------------------------
Jon Butler
Original Message:
Sent: Sat June 08, 2024 06:51 AM
From: Denis FALLAI
Subject: Looking for samples of checkpoint/restart solutions in a COBOL Db2 context with explicit commits.
Hi,
The COBOL language (or the IBM Enterprise COBOL compiler) offers a checkpoint/restart solution in the event of an interruption (abnormal end) of processing.
This solution is based on counting records read from a main file.
This does not guarantee the creation of a checkpoint image in a coherent context, (several records of the main file can be logically dependant), and does not allow the creation of the checkpoint image to be synchronized in consistency with a Db2 commit.
There are a few rare examples available on the Internet, but they are essentially focused on Db2 management and never take into account the management of the state of the program's memory at the time of commit. However, the program memory can contain essential informations such as computed variables as counters, context indicators, etc. They also do not take into account the management of input and output files and the need for repositioning on these files.
So I'm looking for a solution to trigger checkpoint images programmatically, moreover in a Db2 context, (and without using IMS which is not in our technical context):
- programmatically triggering the creation of a checkpoint image synchronized with the Db2 commit,
- automatic (or possibly programmed) management of the repositioning of input and especially output files (eliminate records created after taking an image of the resume point).
I understood that the COBOL solution was in fact based on z/OS DFSMS functionalities, but I did not find any routines callable from a COBOL program, (there are assembly macros but no routines compatible with a High Level Language).
Thanks for your help.
------------------------------
Denis FALLAI
BPCE SI, BPCE group.
------------------------------