My requirements are as follows
1. Update a table (after 20 rows put a Commit stmt)
2. After each commit, wait for one minute and resume the transaction and that should run for one hour (not greater than or less than one hour)
My question is "are we having any cobol syntax to put DB2 wait time for a minute? "Please let me know if you have an idea
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
The wait one minute and run for exactly one hour requirement seems completely arbitrary though and pointless. This seems like homework, I can't see a business doing this run for only one hour crap. It doesn't account for differences in the data size or a starvation of resources for the job.
What if all the rows aren't in after an hour or you run out of rows in that hour. Are we talking an hour of CPU time or an hour of wall time? What if the job starts and the system is so loaded down that your job doesn't get any CPU for over an hour? Has the program actually met the hour run time requirement? And, if it doesn't get any CPU time at exactly that hour mark and therefore can't end at exactly an hour are you going to lose points on the assignment?
There is no DB2 wait time, you need to build this into your COBOL logic. You will also increase the CPU time of your program for no reason other than to introduce a wait period and that increases costs to your business.
I seem to be asking more questions of the posters lately than giving answers...