Table locks in Find/Browse

DRezanka

DRezanka

Reputable Poster
Hi,

We are a DB2/400 customer . . .

Find/Browse forms open and lock the tables used in the grid. It seems odd to me but that is what I've observed. What I need to be able to do is unlock that table for use in a restricted state.

Any idea how I can do this from within the OW app?

I suppose an important subsequent question should be is there any way to test for a lock before opening the table in a Headerless Detail app?

Please reply if you need any additional information

Thanx much,
Doug
 
Such a form will open the business view upon entry and close it only on exit. The lock on the table should be "Shared Read" or the equivalent (sorry, but I don't have access to an AS/400 to verify).

As for your request, are you trying to lock some records to make sure that they are not updated by someone else, or are you trying to lock the entire table?

If you want to lock a transaction, you could implement the business objects locking mechanism that JD Edwards programmers have been using in a couple of systems.
 
Thanx for the reply.

The lock makes sense now. I don't know what I was thinking.

However, I have found that the Find / Browse will occassionally retain the lock after close (open, close, then open, close again). Maybe I just need to mess with it more and call JDE.

The request for testing for a lock is for this:
- I need to have a table in restricted state. Therefore, before I open the table for update, I want to test if there is ANY sort of lock on the file. Can this be done in an app?

Thanx
Doug
 
The Business Object Reservations are held in table F00095. I'm not sure if this is what is causing your problem, but if so you could just read that table to see if there any locks on your table before proceeding.
 
Hi Doug,

There are a couple of business functions that allow you to lock (reserve) records. Search for Business Functions that contain *object reservation*. You can look at the Sales Order Entry Application for an example of how it locks a record (per user/program id/order #). The record is then stored in the F00095 file. The lock is done on the detail screen (W4210A) on the post dialog is initialized event (I think). This object reservation process is part of the "normal" JDE process. So, if you're dealing with standard JDE objects than you may want to look into this. However, if you're talking about custom apps than it's probable that this resevation isn't being done so, you don't have to worry about any of this stuff.
 
FYI - The business functions are F00095ReserveObject (N0000602) and F00095RemoveBusinessObjectReservation.

Again, this probably isn't your problem but, in case anybody wants to know about object reservation...here you go.
 
Back
Top