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 is package in db2 mainframe?

636


How do you simulate the explain of an embedded sql statement in spufi/qmf?

723


What is copy pending status in db2?

734


How to connect to db2 database from windows command line?

651


What is ibm db2 used for?

697






what are bind concepts in db2 cobol?

730


Highlight all the advantages that are attached to a package.

727


Define predicate?

749


How do I change the column size in db2?

709


What are the different types of base tables?

657


Mention data types used in db2 ?

766


What is node in db2?

690


what is the sqlcode -501

11705


What are the full forms of spufi and dclgen and why are they used?

733


How to check sequence on a table in db2?

691