|
Since it's a trigger, it's running in the same job where you do UPDDTA. UPDDTA will get some other lock on the file, but this does not prevent trigger in the SAME job to get *EXCL lock. Best regards Alexei Pytel Jim Langston <jimlangston@conexfreight.com>@midrange.com on 01/02/2001 02:03:11 PM Please respond to MIDRANGE-L@midrange.com Sent by: owner-midrange-l@midrange.com To: "MIDRANGE-L@midrange.com" <MIDRANGE-L@midrange.com> cc: Subject: Why is this lock going through when I am updating the file? I have a CL trigger program on a file on an *INSERT *AFTER basis. In this trigger I am attempted to find out when this file is done being written. I retrieve the &LIBRARY, &FILE and &MEMBER names from the Trigger Parameter 1, then attempt to lock the file thusly: LOCKIT: ALCOBJ OBJ((&LIBRARY/&FILE *FILE *EXCL &MEMBER)) + WAIT(60) MONMSG MSGID(CPF0000) EXEC(DO) GOTO CMDLBL(LOCKIT) ENDDO what is supposed to happen is this is supposed to go into an endless loop until such time as no other operation has the file open. However, it is somehow getting past this code when I am still updating the file. UPDDTA FILE(BSTONED/INRECX) MBR(BRECX001) Here I hit F10 and insert a record (trying to emulate what the automatic file receiving program is doing). Every time I insert a record the file is getting sent (one of the next lines is SNDNETF). Any ideas why the program isn't waiting for the file to be locked? Or why is it allowing an exclusive lock on an open file? Regards, Jim Langston +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.