Yet another item for the journal of irreproducible results. A day later my confusion has cleared: for a new record the i-type subroutine is called once; changing an existing records causes the i-type subroutine to be called twice, first with @record = old record, then again with @record = new record. With appropriate logic and flag(s) in named common, you can tell where you are and where you've been, and proceed accordingly.
Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Ballinger Sent: Thursday, August 12, 2004 5:38 PM To: [EMAIL PROTECTED] Subject: RE: [U2] file trigger self deadlatch error It turns out the i-descriptor is called multiple times for an indexed field, with before and after versions of @record. Thus by keeping track of the number of times I've been called and keeping the first version of @record in named common, I can avoid the read altogether. However, multiple changes to the same record are generating 2x the number subroutine calls, i.e. when I edit the same record a second time the subroutine gets called 4 times (with @record cycling through all previous incarnations!), on the 3rd edit it gets called 6 times, etc. Perhaps someone can explain what's going on? Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allen E. Elwood (CA) Sent: Thursday, August 12, 2004 4:33 PM To: [EMAIL PROTECTED] Subject: RE: [U2] file trigger self deadlatch error Not sure about UV, but a U2 program that I've used in the past does a : OLD.REC = XLATE('IPL',ID,-1,'X') since XLATE does a read-only read of the file in question, maybe if you opened a file handle that was read-only (or use UV's version of XLATE?) and used that to read the record you need, it would not generate the error, which is more than likely telling you that an endless loop is in progress and the system is halting instead of going away forever in a system hogging endless loop requiring a reboot to stop. hth, aee -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Scott Ballinger Sent: Thursday, August 12, 2004 15:09 To: [EMAIL PROTECTED] Subject: [U2] file trigger self deadlatch error I am trying to implement a file trigger on UV 9.6.14 using a secondary index on an i-descriptor subroutine. I want to log changes to selected fields before the write, so I am re-reading the original record from my subroutine to compare with @record. This generates the message Self Deadlatch error on device 2054, inode 2681749, group 1536, latch 80000 to 10000. inode 2681749 resolves to the uv (data) file where I have defined the trigger. I actually seems to be working, except for this pesky error message. Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
