Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 Restart logic

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Bhanupratap Natva

New User


Joined: 13 Jul 2007
Posts: 8
Location: Hyderabad

PostPosted: Mon Feb 22, 2010 12:55 pm    Post subject: DB2 Restart logic
Reply with quote

Hi,

Can any one let me know is there any logic to handle the
restart logic in DB2.

For ex: My program is updating a table, after some point of time my program got abended. Now when I restart my job I want to start from the record where the step got abended. I have searched the forum with the string 'DB2 Restart logic' but found nothing. Please let me know if you have any links related to this concept.

Thanks,

Bhanu.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 22, 2010 1:21 pm    Post subject:
Reply with quote

Hello,

Restart processing is implemented for individual systems or for an entire environment. This is not something "tossed in" to some code so this can be done.

Places that support this type of restart have formal procedures that mustbe followed. Due to the speed of the new cpu's and dasd, many places no longer implement this. It is faster and less error prone to simply rerun from the beginning.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Feb 25, 2010 5:17 am    Post subject:
Reply with quote

Usually this is done by designing the query in your cursor to return rows in unique key order and by selectting rows >= to a preset value of a unique key along with other constraints that qualifies your rows.

When initially starting the job the first key value to retreive would be the lowest possible.

When you want to save the restart values of your program at certain restart points (sync points/check points) during program execution, you should save the key values.

In case of a restart, the logic should load the key data saved in the last checkpoint and insert the key value to start from in your cursor SQL expression before opening the cursor.

DB2 does not provide methods for syncronising LUWs across DB systems like e.g. IMS and CICS does.

Quote:
Places that support this type of restart have formal procedures that mustbe followed. Due to the speed of the new cpu's and dasd, many places no longer implement this. It is faster and less error prone to simply rerun from the beginning.

I don't completely agree with Dick that checkpoint/restart functionality has lost it's value. If you have batch updates to data concurrently accessed in real time applications, you can free up update locks held by by commiting your updates with frequent checkpoints.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 25, 2010 6:48 am    Post subject:
Reply with quote

Hello,

Quote:
In case of a restart, the logic should load the key data saved in the last checkpoint and insert the key value to start from in your cursor SQL expression before opening the cursor.
And also keep in mind that any sequential data that is being written (files and/or reports) will need to be re-created and syncronized.

Then there is the possibility that some vsam data was written/updated. . .

The list can become quite extensive.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Feb 25, 2010 3:36 pm    Post subject:
Reply with quote

Quote:
And also keep in mind that any sequential data that is being written (files and/or reports) will need to be re-created and syncronized.

Then there is the possibility that some vsam data was written/updated. . .

That is also within the scope of IMS checkpoint/restart logic, provided you access these datasats as GSAM databases.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
No new posts Control-M restart instruction sonaliingle CA Products 2 Tue Nov 28, 2017 5:05 pm
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Need help in building a logic Benchwarmer All Other Mainframe Topics 4 Wed Feb 22, 2017 2:49 am
No new posts Wildcard logic in COBOL dudenithy COBOL Programming 13 Thu Sep 01, 2016 7:36 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us