View previous topic :: View next topic
|
Author |
Message |
hadimam Currently Banned New User
Joined: 15 Jun 2006 Posts: 10 Location: Bangalore
|
|
|
|
Hi all,
can we restart option during the update from the last abended record.
Thanks in advance. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Yeap |
|
Back to top |
|
|
hadimam Currently Banned New User
Joined: 15 Jun 2006 Posts: 10 Location: Bangalore
|
|
|
|
Hi Guptae ,
if i declare the cursor with the with hold option ,if the abend occurs during the updation, if we use the commit option for the last successful update, updation will be done in the database the cursor will not be closed ,can we use the restart option from the last successful update,if yes.
Please update the synatx how, and where to code in the program??
Thanks in advace
Mahantesh |
|
Back to top |
|
|
Hanfur
Active User
Joined: 21 Jun 2006 Posts: 104
|
|
|
|
If you are Updateing Millions of data to Table u need to have RESTART -COMMIT logic implemented in Program.
This is setting up a RESTART table which would hold the values which u updates to the actual Table along with RESTART-FLAG as Y or N
In program u have to first check the Restart table checking that the program is restarted or started for the first time by checking the Y/N restart flag.Then get the last record processed from RESTART table and start update operation from there..
-Han |
|
Back to top |
|
|
hadimam Currently Banned New User
Joined: 15 Jun 2006 Posts: 10 Location: Bangalore
|
|
|
|
Hi Hanfur,
Please let me know all the steps involved and syntax used in the above process .
Hadimam |
|
Back to top |
|
|
Hanfur
Active User
Joined: 21 Jun 2006 Posts: 104
|
|
|
|
Check the link given below ..The procedure is same..but here a global table is used for keeping data just before writing to file.You have to tailor it accoridng to ur need
[url]its.ne.gov/enterprise_computing/ db_mgt/pdf/Check-Restart_Scenario.pdf
-Han[/url] |
|
Back to top |
|
|
anadhamohan
New User
Joined: 27 Sep 2005 Posts: 25 Location: india
|
|
|
|
Hi,
I would like to share some point to this as Hanfur said just declare 2 cursors, once you update the record in table just take the primary key and insert that to the RESTART/CHECKPOINT table, doing so you can get the last updated record before abend, in the start of the procedure just check for the values in the RESTART table and take the last value, use a select crietria and proceed the process.
I believe you need to have one restart table other than the process you follow normally.
use th second cursor to insert the primary key value to restart table.
Hanfur I tried the link below given but it's not showing the web page, can you please post again the URL.
Thanks in advance,
anadhamohan |
|
Back to top |
|
|
Hanfur
Active User
Joined: 21 Jun 2006 Posts: 104
|
|
|
|
Attached the file..
-Han |
|
Back to top |
|
|
anadhamohan
New User
Joined: 27 Sep 2005 Posts: 25 Location: india
|
|
|
|
Thanks for the manual |
|
Back to top |
|
|
|