Page 1 of 1

Checkpoint restart sample program

PostPosted: Sat Jun 28, 2008 9:23 pm
by Sarfraz S
Hi,

Can anyone please get me a sample batch file processing COBOL code with checkpoint and restart logic? I need this urgently.....

Re: Checkpoint restart sample program

PostPosted: Sun Jun 29, 2008 12:30 am
by dick scherrer
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. . .

Re: Checkpoint restart sample program

PostPosted: Sun Jun 29, 2008 12:41 pm
by Sarfraz S
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

Re: Checkpoint restart sample program

PostPosted: Sun Jun 29, 2008 2:27 pm
by dick scherrer
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

Re: Checkpoint restart sample program

PostPosted: Fri Jul 04, 2008 5:25 pm
by jayind
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

Re: Checkpoint restart sample program

PostPosted: Sat Jul 05, 2008 1:53 am
by dick scherrer
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".

Re: Checkpoint restart sample program

PostPosted: Mon Jul 07, 2008 7:11 pm
by Bill Dennis
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.