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

Restart Logic in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Thu Apr 22, 2010 12:38 am
Reply with quote

The requirement is like I need to read records from file and update in the database.Each time I have to commit,as if the program abends then it will restart after the last record that had been updated in the database.

I need to impement this in my cobol program.Can any one let me know how to do it?how to put restart logic in cobol?
It will be helpful if any one get me some sample code or link of a sample code for cobol restart.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Apr 22, 2010 1:08 am
Reply with quote

Hello,

Restart/recovery are not a single-program issue. . .

If an organization uses this, it is already defined what is needed to be incorporated in application to participate in the restart/recovery. You should not "roll your own" method. You should use the already implemented process.

Many (most) organizations no longer put this into new programs being developed. It is typically less error prone and less time consuming to simply rerun from the beginning.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Thu Apr 22, 2010 9:49 am
Reply with quote

Hi mad_guy,

As Dick rightly said, there certainly should be some organization standard on how this is to be done...

Anyways, in case you have got a requirement like this, my suggestion would be to have a DATE-TIME field in the record when you are writing to the database. Using this field you could put the logic in your program based on your requirements and frequency of the program getting invoked.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Apr 22, 2010 2:49 pm
Reply with quote

Hi,

Before you start with you need to know what is check-point restart. I'll try - Checkpoint/Restart allows you quickly insert COMMITs and CHECKPOINTS into your DB2 batch job streams – in some instances with- out even editing your programs. These COMMITs will often speed up DB2 batch programs and also free up DB2 resources for other production jobs that are running at the same time. After COMMITS are added to your DB2 batch programs, Checkpoint/Restart allows you to quickly restart any abended production job from the point of failure. Checkpoint/Restart will reestablish all positioning and resources within the problem program, including COBOL Working Storage and QSAM and VSAM file access; and then completes any remaining application processing rather than rerunning the whole DB2 program from the beginning.

Checkpoint Restart also provides a powerful Variable COMMIT Frequency Option that enables you to dynamically tune DB2 batch jobs by changing their COMMIT frequency as they run. Database Administrators can now dramatically speed up any jobs that need to be completed as soon as possible prior to the online DB2 applications being restarted.

Here is one supporting link: publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.admin/fastrest.htm

If you are intrested in BMC, here is a link to look at: www.bmc.com/products/proddocview/0,2832,19052_19429_22984_2005,00.html
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Apr 22, 2010 8:50 pm
Reply with quote

If your shop support IMS BMP or DBB programming, the same functionality is provided in these environments.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top