IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Restart option during the update from the last abended rec


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hadimam
Currently Banned

New User


Joined: 15 Jun 2006
Posts: 10
Location: Bangalore

PostPosted: Tue Jun 20, 2006 3:33 pm
Reply with quote

Hi all,
can we restart option during the update from the last abended record.

Thanks in advance.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Jun 20, 2006 3:48 pm
Reply with quote

Yeap
Back to top
View user's profile Send private message
hadimam
Currently Banned

New User


Joined: 15 Jun 2006
Posts: 10
Location: Bangalore

PostPosted: Wed Jun 21, 2006 11:26 am
Reply with quote

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
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Mon Jul 03, 2006 11:13 am
Reply with quote

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
View user's profile Send private message
hadimam
Currently Banned

New User


Joined: 15 Jun 2006
Posts: 10
Location: Bangalore

PostPosted: Tue Jul 04, 2006 11:10 am
Reply with quote

Hi Hanfur,

Please let me know all the steps involved and syntax used in the above process .

Hadimam
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Tue Jul 04, 2006 5:08 pm
Reply with quote

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
View user's profile Send private message
anadhamohan

New User


Joined: 27 Sep 2005
Posts: 25
Location: india

PostPosted: Tue Jul 04, 2006 7:11 pm
Reply with quote

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
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Wed Jul 05, 2006 10:59 am
Reply with quote

Attached the file..

-Han
Back to top
View user's profile Send private message
anadhamohan

New User


Joined: 27 Sep 2005
Posts: 25
Location: india

PostPosted: Tue May 29, 2007 12:45 pm
Reply with quote

Thanks for the manual
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Reorg abended with REASON=X'00E40347' DB2 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts CICS vs LE: STORAGE option CICS 0
No new posts INSYNC option with same function as I... JCL & VSAM 0
Search our Forums:

Back to Top