|
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
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.