View previous topic :: View next topic
|
Author |
Message |
Verma,Raman
New User
Joined: 13 Oct 2006 Posts: 15
|
|
|
|
Hi,
I have a COBOL program which accesses a DB2 table.The High Level Functionality is as follows...
> I read a full table into a cursor.
> Process the data (all rows) top to bottom one-by-one
> If the data from a row satisfies a particular condition, I need to delete that row from the table.
> Continue the above three steps until we reach end of cursor.
My concern is that what will happen if
> ...my program abends.Will it have to start looking into the table right from the beginning? ( Is there any sort of checkpointing in DB2 as it is in IMS )
> What will happen if there is any conflict for table usage with any other program? (Do we have any provisions for Hold on table as we have in IMS)
I will be thankful if I get some help with the above questions of mine.
Regards,
Raman |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi Raman,
We have BMC utility which take care of abends and checkpoints.
If commit count is given as 1000 then first checkpoint will be generated at 1000record and 2nd checkpoint at 2000.
If program abends at 2500 row i.e, after checkpoint 2 and before checkpoint 3 then BMC will restart the program after checkpoint 2.
This avoids reading all the records. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
Back to top |
|
|
Itanium
Active User
Joined: 22 Jan 2006 Posts: 114 Location: India
|
|
|
|
Hi Raman,
Can you check if this is feasible for you to do.
1# Unload the table into a Flat File
2# Extract only the required records using Sort
3# Reload the Flat File into the table
This would reduce the READ/DELETE overhead to DB2 and this will be faster than your process.
Thanks,
Itanium. |
|
Back to top |
|
|
|