Hi Dave,
I have a table with thousands of rows. I want to delete some of the rows using a COBOL MVS batch program. A CICS system application is accessing this table also, but we do not want to this program to impact the CICS application. This COBOL batch program does cursor open fetch/delete processing. After about 100 deletes I issue a commit then reopen the table (because the commit closes it) and continue the fetch/delete processing. Unfortunately, after 500 to 700 deletes the fetch senses an end of table sqlcode 100 and the program ends because DB2 says it is at the end of table. However, I then run a spufi sql querry and find there a thousands of records left which meet my criteria. This is a test system where there is almost not activity (no one is adding rows). I run the batch program again and it deletes 500 to 700 more rows then senses an end of table after the fetch and closes down again. The commit causes the cursor to be closed, so I am opening the cursor again after every commit which is issued after every 100 deletes. I cannot understand why the fetch encounters an end of table when there are more rows left which meet the select criteria. I am not a db2 specialist, but feel there must be some system parameter, partitioning parameter or something which is causing DB2 to sense end of table even though it has not processed all the rows. If you have any experise in DB2 I would appreciate hearing any ideas you might have regarding this problem.
Thanks,
Steve