I have a program which is running every 10 minutes in batch mode.
The program would update a Z table with the last record timestamp. The same timestamp would be used for next run of the program as starting time and the end time would be current time.
During at some instancs, the time does not seem to be updated properly and is fetching the same set of records. It is difficult to debug since we dont know when this is happening.
I have used the following function to update my table. Let me know whether i can do anything to make sure it updates.
I think 10 minutes is more than enough for a database update to happen.
CALL FUNCTION 'ENQUEUE_E_TABLE'
mode_rstable = c_lock_write
tabname = c_table_zut
foreign_lock = 1
system_failure = 2
OTHERS = 3.
UPDATE zut_enhanceval FROM TABLE t_defaults.
CALL FUNCTION 'DEQUEUE_E_TABLE'
tabname = c_table_zut.
Do i need to put commit work at ends of this to make it immediate or is there any issue with my enqueue and dequeue functionality. Please advise as this is causing big production problem