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
Mention the definition of cobol in varchar field.
What is a storage group (stogroup)?
What are the various isolation levels possible?
How can you count the number of rows from a table tab?
How can record locking be achieved in those DB2 versions which do not support it?
What are concurrency issues?
What is the use of with ur in db2?
define clustering index.
What r the comman abends in db2, jcl and cobol???????
How to compare data between two tables in db2?
List some fields from sqlca?
What is rebind in db2?
What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?
i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?
What is a system catalog table in db2?