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

Answers were Sorted based on User's Feedback



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

Answer / lu

Hi Rameshkumar.h.k,
Honestly, i don't understand.... when u say :
1)You should pass CHECKpoint frequency value from JCL to
cobol program. what's it....give me an example please in
cobol program, and in JCL....

Is This Answer Correct ?    1 Yes 0 No

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

Answer / 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

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

Answer / rameshkumar.h.k

You should pass CHECKpoint frequency value from JCL to
cobol program.Intern cobol program will have the table of
retart logic.
Table contents(coloumns)be: 1.No of records ,2.No of
records + 1, 3.no of records processed etc.
Once the updattion or insertion got stucked while
processing ,All the relative data will be stored the above
mentioned table.

So check the record from table .Fix the abend and restart
your job for the failed step.

This is mainly production support work .manually u have to
check the record .and get the records info from the table
and restart the job from the failed step

Hope You clread

Is This Answer Correct ?    0 Yes 0 No

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

Answer / vicky

CHECKpoint frequency value from JCL to
cobol program. This means, number of records after which the data should be commited, and chkpoint fixed.
If chkpoint frequency is 10 , then after every 10 records, data will be committed.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / laxmikanth

restart will give in job card in jcl when ever u got any
abends then we have to give give particular step name
there.........like
Restart=step5.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More DB2 Interview Questions

Say CUST Table contains records like: CUSTNO CUSTNAME CUSTLOC 100 ABC SSS 200 XYZ 300 PQR 400 MNO WWW 500 CVV ------------- ------------- Now write a query to retrieve all records with CUSTLOC no data.

3 Answers   IBM,


This was related to -811 sqlcode, In a COBOL DB2 program which accesses employee table and selects rows for employee 'A', it should perform a paragraph s001-x if employee 'A' is present. In this case it gets -811 sqlcode, but still it process the paragraph s001-x. What could be wrong in my code.

3 Answers  


what is + sign and -ve sign for sql code ?

1 Answers   TCS,


What error I will get if my select query gives multiple row while executing a Cobol-DB2 program.How can I solve it without using a cursor.

4 Answers   Cap Gemini, Verizon,


Suppose we are doing transaction in a table and abend happened in between. Suppose i have completed the transaction upto X rows and I want to start the transaction again where the abend happened. I don't want to do the transaction from the first record. Then what i have to do.

9 Answers   Cap Gemini,






What is host variable in db2 cobol?

0 Answers  


What technique is used to retrieve data from more than one table in a single SQL statement?

9 Answers   CTS, IBM, TCS,


what will be the output of the below given query, if no matching records are found : (a.) 0 (b.) null (c.) error select Avg(salary) from TableA where Deptno = 'insurance'

10 Answers   Amdocs,


What are the contents of a dclmgen?

0 Answers  


How to check sequence on a table in db2?

0 Answers  


If we keep the DCLGEN structure for a table in a copybook and include it in the COBOL program using the COPY statement, will there be any impact during compilation or at any stage of program execution?

2 Answers  


What Utility is used to migrate DB2 from one release to the next?

1 Answers  


Categories