Skip to Content
0
Aug 07, 2012 at 11:51 AM

Apply read lock on table till the program is over

17 Views

Hello guys,

I have a custom table 'ztable' which is accessed and written by two programs of same type. One program is for automatic data generation and other is manual data generation. I have created the lock object EZTABLE. Now if i want to use this lock in my program such that while my program is running the data from ztable shouldn't be available for any other program. i.e. i want READ LOCK on the database table. But when i used ENQUEUE_EZTABLE while start-of-selection and DEQUEUE_EZTABLE just before LEAVE PROGRAM statement and i ran the other program. But the program is still able to read the data. What is wrong in my program?

Regards,

Yayati Ekbote