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
What type of database is db2?
Define data page.
How do you select a row using indexes in db2?
How does a cursor work?
What is buffer pool in the db2 database?
What is the maximum size of a char data type in db2?
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.
What is reorg and runstats in db2?
What is the advantage in De-normalizing tables in DB2?
Comment whether the cursor is closed during commit or not.
Which is faster delete or truncate?
How to find the maximum value in a column in the db2 database?
List out the buffer pools in db2
How to check table size in db2 sap?
What is a page in db2?