Checkpoint restart sample program



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Checkpoint restart sample program

Postby Sarfraz S » Sat Jun 28, 2008 9:23 pm

Hi,

Can anyone please get me a sample batch file processing COBOL code with checkpoint and restart logic? I need this urgently.....
Sarfraz S
 
Posts: 4
Joined: Sat Jun 28, 2008 2:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Checkpoint restart sample program

 

Re: Checkpoint restart sample program

Postby dick scherrer » Sun Jun 29, 2008 12:30 am

Hello Sarfraz S and welcome to the forums,

Can anyone please get me a sample batch file processing COBOL code with checkpoint and restart logic?
Checkpoint/restart is not something that is just "stuck" into a program.

Logging/recovery/chekpoint/restart are decided for an entire application or database environment. If you are working on an existing system, you need to follow whatever convention is being used by that system. If this is a new system, these decisions need to be made before code is implemented because the way this is handled can influence how programs are structured.

I need this urgently.....
Sorry, we don't do urgent here. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Checkpoint restart sample program

Postby Sarfraz S » Sun Jun 29, 2008 12:41 pm

Thanks for the reply.... But I need atleast the psuedocode considering a normal file processing program which reads an input file, takes checkpoint at every 100th record (for example) and if it abends at say 571st record, then it should restart from the 501st record. Here no database is involved and it is a pure batch file processing program. It would be of great help to me if you could get me atleast the pseudocode for it.

Thanks in advance
Sarfraz S
 
Posts: 4
Joined: Sat Jun 28, 2008 2:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Checkpoint restart sample program

Postby dick scherrer » Sun Jun 29, 2008 2:27 pm

Hello,

Is this somethng for class or for actual work?

Here no database is involved and it is a pure batch file processing program.


How do you intend to keep track of the restart point if not written/committed to a restart table or ?

There is more to a program than input. . . All output needs to be re-syncronized - including totals that were being accumulated.

Places that use this type of restart have well-documented processes on how to handle a restart - you do not just "make one up" for a given program.

With today's bigger/faster computers, many places have gotten away from using checkpoint/restart. It is faster and safer to re-run from the beginning than try to re-start in the middle.

The simplest pseudo-code wuld be:
Begin
If a restart, re-sync.
Process from where we are now (beginning or restart point).
End
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Checkpoint restart sample program

Postby jayind » Fri Jul 04, 2008 5:25 pm

Dick,

looking at your reply, i understand that it requires system side configuration also apart from developer changes in the program. if it requires system configuration/setup, what kind of setup does it require? Please give an example... could you please explain more on the pseudocode given below.. a simple example would be a great help!!!

The simplest pseudo-code wuld be:
Begin
If a restart, re-sync.
Process from where we are now (beginning or restart point).
End



Regards,
Jay
jayind
 
Posts: 62
Joined: Wed Apr 23, 2008 1:37 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: Checkpoint restart sample program

Postby dick scherrer » Sat Jul 05, 2008 1:53 am

Hello,

i understand that it requires system side configuration also apart from developer changes in the program.
These are not operating system changes but rather application system/database considerations.

what kind of setup does it require?
Decisions must be made as to how restart/recovery will be handled across that application and/or database and/or external data (reports, qsam files, etc). This is almost never done by just the programmer. . . An individual program's restart would be done by the programmer, but following the overall restart methodology.

As i mentioned before, this is done less and less these days. Existing methodologies are often continued, but as new processes are developed it is almost always decided to rerun rather than "restart in the middle".
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Checkpoint restart sample program

Postby Bill Dennis » Mon Jul 07, 2008 7:11 pm

For basic sequential batch processes with multi-volume files (non-VSAM), DFSMS offers an automated checkpoint process at each volume change. Code CHKPT=EOV on the multi-volume DD statement and DFSMS will take checkpoints for you. Add SYSCHK DD to record the checkpoint records.

Read about it in the DFSMS Checkpoint/Restart manual for use and restrictions.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post