when we are tying to update a table having 100 rows. if the
program abends when updating 51 row . how to start updating
again from the 51 row .what was the logic

Answer Posted / kamra2010

1) Create two work files, say WORK-1 and WORK-2.
2) Unload the table into file WORK-1.
3) Pass the commit frequency through the JCL to the program.
4) Program logic:
(i) read the input file WORK-1
(ii) update the table
(iii) if the number of records updated in the table is
equal to the commit frequency then apply COMMIT command.
Also, write the last committed record into the output file
WORK-2. (this record will be used for restart logic)

(iv) In Restart process,
a. read the output file record
b. next, the input file will be read untill it
finds the corresponding output file record
c. follow the same step 4(i) to step 4(iii)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does reorg do in db2?

775


What is copy pending and check pending in db2?

751


What are the bind parameters ibm db2?

804


What is lock escalation in db2?

775


How do I create a view in db2?

789


Are views updateable?

834


What is view db2?

838


When reorg is used?

853


What is the purpose of rollback and commit?

800


Is db2 a database?

734


What is meant by union and union all?

779


What is the reason behind not using select * in embedded sql programs?

839


How can we retrieve the total number of records in RPG & CLLE?

372


in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?

1840


Define data page.

811