View previous topic :: View next topic
|
Author |
Message |
abdulrafi
Active User
Joined: 14 Sep 2009 Posts: 184 Location: Coimbatore
|
|
|
|
Hi,
A have a doubt regarding the checkpoint restart logic.
I have a program which needs to read every record from a DB2 table and load it into a PS file. I have the checkpoint logic in place. The logic is like for every 10 records fetched a checkpoint is taken. Consider that my file contains 100 records. My pgm has processed 10 records and the first checkpoint has been taken. Later when my pgm processed the next 5 records it got abended. Now totally there are 15 records written
into the file and I have 1 checkpoint in my hand which was taken after 10 records fetched.
Now I am giving the restart-id in the jcl to execute my pgm from the abended spot. When my pgm is executed i don want the records 11 to 15 to be read again which has been already read and updated in
the file. Considering my file is opened in extend mode so as to append the datas one below the other.
Currently it fetches from 11 as my checkpoint point was taken after 10 records were fetched and read. Because of which i am getting duplicate entry in my flat file which is not required.
Please assist me a way to eliminate duplicate record. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
abdulrafi wrote: |
Hi,
A have a doubt regarding the checkpoint restart logic.
I have a program which needs to read every record from a DB2 table and load it into a PS file. I have the checkpoint logic in place. The logic is like for every 10 records fetched a checkpoint is taken. Consider that my file contains 100 records. My pgm has processed 10 records and the first checkpoint has been taken. Later when my pgm processed the next 5 records it got abended. Now totally there are 15 records written
into the file and I have 1 checkpoint in my hand which was taken after 10 records fetched.
Now I am giving the restart-id in the jcl to execute my pgm from the abended spot. When my pgm is executed i don want the records 11 to 15 to be read again which has been already read and updated in
the file. Considering my file is opened in extend mode so as to append the datas one below the other.
Currently it fetches from 11 as my checkpoint point was taken after 10 records were fetched and read. Because of which i am getting duplicate entry in my flat file which is not required.
Please assist me a way to eliminate duplicate record. |
What does this have to do with IMS DB/DC? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
IMS or not, why does someone believe the records from 11 thru 15 should not be reprocessed?
When you issued the checkpoint after 10 iterations, that is your last valid checpoint - the last place from which you can successfully restart.
You need to study the basics of backup/restore checkpoint/restart. It appears you do not have this understanding.
At this late date, i suspect there is no checkpoint/restart needed. Simply backup the data before the update run and if there is an abend, reload from the backup and rerun from the beginning. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
abdulrafi wrote: |
Hi,
A have a doubt regarding the checkpoint restart logic.
I have a program which needs to read every record from a DB2 table and load it into a PS file.
|
If all you are doing is fetching from a table (note tables have rows not records) and writing to an output file worrying about a restart is a waste of time and resources! |
|
Back to top |
|
|
abdulrafi
Active User
Joined: 14 Sep 2009 Posts: 184 Location: Coimbatore
|
|
|
|
Thanks for your help. |
|
Back to top |
|
|
|