could you give me an example how, where i code CHECKPOINT
and restart...I need and example....thanks..

Answer Posted / vicky

Since I cannot type in all details...just letting u know some of them----
we need to make some changes to the JCL and also the cobol pgm.
In JCL-
Firstly, we need to include a library for smart restart.
Secondly, define a DSN for the chkpoint restart file, that shall store the information about the chkpoint created and with the number of records committed till the abend occurred ,so that when Job is restarted chkpoint can be checked.
Thirdly,the SYSIN for the RAINPUT step will consist of all the other parameter.Eg- frequency, chkpoint, sql code, etc

JCL will look like-
//EXAMPLE JOB
//STEP1 EXEC PGM=EXAMPLE
//define libaries
//OUTFILE DD DSN=file PS ,DISP=OLD
//
//RAINPUT DD * <-- Optional Smart/RESTART parameter file

CKPT_PACE(50)
//

Coming to the cobol pgm-

we need to code a switch whose value can be chked in case of abend, based on negative SQLCODE returned.
the value returned can be
0 = (Intial start)
1, +2001 = (Restart)
Later Commit para can be called.
If value 1 and +2001 , the pgm can be restarted for a same sqlcode returned , that number of times defined in
parameter of RAINPUT

Hope u could be somewht clear to this,,,

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to view db2 table structure?

597


Can one database have multiple instances?

583


What is reorg?

619


How to fetch the last row from the table in SQL (db2)?

1043


What is schema in db2?

576






How can you classify the locks in db2?

636


When do you specify the isolation level?

612


How can you quickly find out the # of rows updated after an update statement?

634


What is a bind card?

681


Comment whether the cursor is closed during commit or not.

676


What is dbrm? When it will be created?

602


What is database alias db2?

613


What are the different types of base tables?

587


When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?

3122


can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well

1808