"EndDoc" locks records ??

jdeman

Active Member
\"EndDoc\" locks records ??

Friends,
Need some input. Following is the scenario:-
This is related with Purchase Order Entry. Let me explain technically.

The "EndDoc" MBF is called in the "OK" Button's "PostButtonClicked" event of Header Detail Form. I put a breakpoint (Debug) just
after the EndDoc call I could see the records created by the "EndDoc" in the table (PO Detail-F4311) using UTB/SQL .
If I try to perform any type of Table-IO (say Fetch) on these newly created records just after the MBF call ,it errors out.
However the Table-IO is succesfull in the event "End Dialog" of the Form.
Are the records locked by "EndDoc" or the "Event" itself or something else ???

1. It happens in all the ENV (Prod/CRP) on (FAT Client)
2. It does not happen on my DEMO Jr.
3. My friend reported similar problem at another client site but one of my other friend did not have this problem.

Did you guys experienced this problem earlier.
Any suggestions.

TIA
jdeman
OW-XE (SP-16.1) WINNT
Co-exist AS/400

(Background - We need to store some data in the user reserved fields of the PO Detail F4311. Since the "EditLine" MBF does not
update the user reserved fields in F4311 I have to put a mod to update the detail records using Table I/O. Therefore using Table-IO "Update statement" just after "EndDoc" MBF call)
 
Re: \"EndDoc\" locks records ??

Hi Jdeman,

There is some 'locking' on the F4311 records, not sure when it's invoked/released though I imagine it's initiated whenever a record may be changed and released at some point after EndDoc, so could be causing you problems. The locking is carried out at the application rather then database level. Application P00095 can be used to see which records are currently locked. Have a purchase order open in detail and the lines should be reserved in this screen.

Regards

Neil.

OW B733.3 (XE), SP 16
AS/400, OS V5.1
 
Re: \"EndDoc\" locks records ??

Couldn't resist looking to see where it ws released - have a look at the End Dialog event on the order detail form and you'll see a call to bsfn "F00095 Remove business object reservation" - that'll be the problem.

Regards

Neil.

OW B733.3 (XE), SP 16
AS/400, OS V5.1
 
Re: \"EndDoc\" locks records ??

Hi,

we have seen this in several applications. You need to ensure that any table IO is performed in the post button clicked event after the EndDoc has completed and, additionally, if transaction processing is on, and I think that it will be, then the table IO can only performed after the transaction boundary has completed and the commit has been performed.

You could also process the EndDoc in synchronous mode. If the BSFN is running in asynchronous mode then the records may still be locked until the whole process has completed. We turned the EndDoc in ship confirm to run synchronously to get round these kind of problems. This will of course impair performance and so it depends on your volumes etc..

One final note. It is more efficient, although more complex, to change the BSFN datastructures to pass all the user reserved columns so that these are included in the cache tables. Then the extra values can be included into the base tables directly within BSFN without any need for table IO. Care must be taken though as all BSFNs which call the modified BSFN must be rebuilt.

Good luck!

Andrew Holder

AS400 V4R5, Xe SP16_001 thru 019.
 
Re: \"EndDoc\" locks records ??

Niel: Let me try researching as you suggested if the records are locked due to object reservation function. Why should it work on Demo Jr. and at another client site still is an open question ??

Andrew: I am calling EndDoc in "Synchronous Mode". I thought of modifying the MBF but was restricted by the client.

Thanks both for replying.

jdeman
OW-XE (SP16.1) WINNT
Co-exist AS/400
 
Re: \"EndDoc\" locks records ??

Jdeman,

Are the Demo Junior and other client site fairly new releases? I don't think the reservation manager was in early releases. Can't remember it in B732.1 though it is in B733.2, though it was probably around a bit before this.

Regards

Neil.

OW B733.3 (XE), SP 16
AS/400, OS V5.1
 
Re: \"EndDoc\" locks records ??

jdeman,
If i am not mistaken Demo Jr. is written with an Access data base which, by definition, will operate different from DB2 or SQL or Oracle, right ? I've never spent too much time figuring out why things work or don't work in Demo Jr. I believe it is really intended to be a sales tool.
Dave


SQL 7.0 SP1, AS400, One World XE, Citrix 1.8
 
Re: \"EndDoc\" locks records ??

The object reservation function does not impact the locking of the records.
As Dave hinted the backend Database might be contributing to this ??.
Anyway I am looking at the [Lock Manager] stanza in jde.ini file whether that plays any role in this.
Any inputs on the [Lock Manager] in jde.ini ??

jdeman
OW-XE (SP-16.1) WINNT
Co-exist AS/400
 
Re: \"EndDoc\" locks records ??

Hi,

Forum, first let me say "Welcome back!" to our old member, to got_to_love_jde Dave.

I agree with Andrew that the locks are transaction processing related feauture and the effected records will be available for the other applications only after the end of transaction scope, which scope can be enough large when the form had been called stacked via more form interconnect with Include Transaction settings and enabled transaction processing. I also agree with Dave (Welcome back again!) that it is not a surprise that OW bahave differently from this eyes point on the Access db based standalone Demo Jr.

I do not want to spend the time to detail transaction processing and record locking, just to point to the "Transaction Processing" and to the "Record Locking" chapters in the Development Tools manual, where these issues are discussed (exceptionaly) enough detailed and well.

Regards,

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Re: \"EndDoc\" locks records ??

Zoltan,
Thanks for replying.
I am familiar with Transaction Processing. That was the very first thing I tried in addition to the Sync/Async option for the MBF call. It did not work for me.

jdeman
 
Back
Top