|
Hi William The help text for the ADDPFTRG command states: "An exclusive-no-read lock is held on the physical file when adding a trigger to that file. All logical files which are built over the physical file are also held with the exclusive-no-read lock." All the best Jonathan -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of William Washington III Sent: 01 December 2004 22:26 To: midrange-l@xxxxxxxxxxxx Subject: Does trying to add a trigger lock the file? Hi All, I want to add a database trigger to a file. Unfortunately, it is a very popular file, used in many different processes. Adding a trigger requires an *EXCL lock. I'd like to retry adding the trigger until I do it. Here's my CLLE code: PGM tryagain1: addpftrg file(oecssl) trgtime(*after ) trgevent(*insert) + pgm(cemk036r0) rpltrg(*yes) monmsg CPF32C6 exec(goto tryagain1) ENDPGM Would this code cause other processes to time out due to an object lock on the OECSSL file? I say no, because if the file is not locked by another process, this code will add the trigger, then exit the program. If the file is locked by another process, it will loop and attempt to add the trigger again. Am I correct in my thinking? Are there better ways to handle this? What are your ideas on using the ALCOBJ OBJ((oecssl *FILE *EXCL)) command? Thanks, William -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
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.