hi Dick,
First of all thanks for your response for my question.
i would like to make the topic clear for you.
Actually i have coded a cobol program which includes the chekpoint logic.
The jcl which runs for this program will unload records from some table
and store the data into one flat file. This file is used as input to the
program. The program will just read this input flat file and writes into outfile
flat file specified in the jcl.
After the unload is done, the input provided to the program has 333
records. when the program is running, if it abends at 50th record, the
checkpoint logic what am using in my program will help in capturing the
record which was processed succesfully just before the abend happened(
we specify something known as FREQUECY as an input to the checkpoint
logic i.e., FREQ(002) as an example). so an entry will be made in a table
called CKPT-TABLE i.e., 48th record is captured in this table as per the FREQ
(002) as an example.
so when we RESTART the program after solving the problem in the 50th
record which caused the abbend in the program, the program will run from
49 record.( the FREQ(002) does means that for every two records we are
COMMIT'ing the CKPT-TABLE to capture that record. i.e., when processing,
everying 2nd record in captured in the table for eg: when program picks up
2nd record it is saved in the table, again when it comes to 4th record, the
2nd record is replaced by 4th record in the CKPT_TABLE. similarly the 48th
was stored in the table!!).
My question is, when we restart the program how the checkpoint would
come to know that it has to start from 49th record!!?
as per i referred to some document, after every COMMIT the records will
be stored in something called as DB2-BUFFER-POOL'. as per the above
example i have shared, 48th record was commited and all those 48
records would be stored in BUFFER_POOL. the records wouldn't be written
to output file specified in the jcl untill all the 333 records got processed
successfully, untill then the records would go on stored in the buffer pool.
so how the chekpoint logic wil come to know that it has to start from 49th
record, whether it will refer the BUFFER POOL or INPUT FILE while getting
restart?
Sorry if have made u feel bore by giving lot of explanation.
i want to know how it works.
Please help.