View previous topic :: View next topic
|
Author |
Message |
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
If your shop support IMS BMP or DBB programming, the same functionality is provided in these environments. |
|
Back to top |
|
|
|