× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Exception handling is one of the most expensive things you can do on an
iSeries -- but it should work. However, I'd go the route you mention at
the end. Add an ALCOBJ at the start w/a wait time of 3600 seconds if you
get it, add trigger and release it. If not, loop. 

-Walden


------------
Walden H Leverich III
President & CEO
Tech Software
(516) 627-3800 x11
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of William Washington
III
Sent: Wednesday, 01 December, 2004 17: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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.