Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Restart Logic in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Restart Logic in COBOL
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

Site Director


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

PostPosted: Thu Apr 22, 2010 1:08 am    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Apr 22, 2010 2:49 pm    Post subject:
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: http://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: http://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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us