View previous topic :: View next topic
|
Author |
Message |
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
Hi,
I have a table which having millions of records, that needs to be updated via some process. If suppose any abend happens during update we need to restart from the record which cause abend, not from the first record.
Currenlty we using a restart file which is used to store the record which cause abend based on SQL code. But i hope it wont work when SOC7 or ASRA or any DB2 system problem, during that time we are not able to write the abend record into restart file.
I heard we can use temporary tables, but i am not sure about the performance issue since the table having high volume. Another method, cursor with hold option but i am not sure whether the cursor still open even after SOC7 or DB2 system prob.
Please suggest some method to restart the JCL from the record causing the abend.
Thanks in advance. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Actually, you do not want to restart the JCL from the reord causing the abend but you want to restart the PROGRAM.
Do a commit every n records. Immediately before doing so insert, somewhere, the current record count. On restart bypass that many records. |
|
Back to top |
|
|
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
Hi Nic,
Quote: |
Actually, you do not want to restart the JCL from the reord causing the abend but you want to restart the PROGRAM.
|
Yes. I want to restart the program.
Quote: |
Do a commit every n records. Immediately before doing so insert, somewhere, the current record count. On restart bypass that many records.
|
If we update the table in sequence manner or all record then based on the count we can restart. But i don't think this method will work if we update the table based on where clause condition. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
But i hope it wont work when SOC7 or ASRA or any DB2 system problem, during that time we are not able to write the abend record into restart file. |
VGK - What your current restart-logic is doing, how it works? Check-point-restart is not meant only for "user abends", as I infer from your post. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
The restart should happen from the last committed point and when even the commit is done you need to store the key data in file or table so on abend u will be able to restart from the next record |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Where is your update data coming from - you did not mention. Is it a sequential file, a VSAM file, another table or somewhere else? |
|
Back to top |
|
|
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
Hi Anuj,
Quote: |
VGK - What your current restart-logic is doing, how it works? Check-point-restart is not meant only for "user abends", as I infer from your post.
|
Currently we are using a flat file which is used to store the record which cause abend based on SQL code while updating the table. But this method wont work when some DB2 system getting down or abnormal abend, because during that time cant able to write the record and system will hang on. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Quote: |
Currently we are using a flat file which is used to store the record which cause abend based on SQL code while updating the table |
Can you please rephrase? |
|
Back to top |
|
|
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
Hi Nic,
Quote: |
Where is your update data coming from - you did not mention. Is it a sequential file, a VSAM file, another table or somewhere else?
|
The data coming from vsam file. But Is there any relation between the incoming data and restart process? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Read the second line of my first post - stands good for a sequential file but for a VSAM file (is it ESDS or KSDS?) you may have to adapt the solution to store the actual last record processed and on restart keep reading until you reach the record after that one and restart your updating from there. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Hopefully, there is already a restart/rerun/recovery proces in place on your system. If there is one, use it.
If not, this is probably not a task to be handled for only 1 process.
How long does the entire process take now? |
|
Back to top |
|
|
|