Skip to Content
0
Former Member
Mar 27, 2009 at 01:28 AM

Data Locking

41 Views

Dear all,

I have a Z program that performing ZTABLE delete and update. The execution of the program is being scheduled every night, and multiple jobs need to be created for the same program due to different job need to update/delete different company code data into ZTABLE. Like below:

Job 1, Company code = A100, A200, A300, A400

Job 2, Company code = B100, B200, B300, B400

Job 3, Company code = C100, C200, C300, C400

Since jobs are execute at the same timing, so i need to implement locking on ZTABLE.

Im thinking to lock ZTABLE at record level. Means During Job1's execution, i will lock data for company code A100, A200, A300 and A400. Once lock obtained, then program will proceed to delete company A* data and then follow by update company A* back to ZTABLE with latest data.

On the other side, same program for Job 2 is executing at the same time. This time program is locking data for company B100, B200, B300 and B400. And then program will delete and update ZTABLE dealing with company B* data only.

I might need your advice with the above design if it is workable. Please comment.