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



James,

Very simple rule...NAME YOUR TRIGGERS!

Don't let the system generate a name for your trigger.

If the triggers have a name, then the system will ensure that only one
of that trigger is attached to the file.

I'm assuming your not using SQL triggers, so for example if you do
ADDPFTRG FILE(MYFILE) TRGTIME(*AFTER) TRGEVENT(*UPDATE) PGM(MYTRGPGM)
TRG(MYFILE_REPLICATION_TRIGGER)

Then you try to do it again....(note program name doesn't matter here)
ADDPFTRG FILE(MYFILE) TRGTIME(*AFTER) TRGEVENT(*UPDATE) PGM(...)
TRG(MYFILE_REPLICATION_TRIGGER)

You'll get an error.

If you want to change the trigger program, specify REPLACE(*YES) like so:
ADDPFTRG FILE(MYFILE) TRGTIME(*AFTER) TRGEVENT(*UPDATE) PGM(MYTRGPGM)
TRG(MYFILE_REPLICATION_TRIGGER)

ADDPFTRG FILE(MYFILE) TRGTIME(*AFTER) TRGEVENT(*UPDATE) PGM(OTHRTRGPGM)
TRG(MYFILE_REPLICATION_TRIGGER) REPLACE(*YES)

HTH,
Charles


On Tue, Feb 1, 2011 at 11:20 AM, James H. H. Lampert
<jamesl@xxxxxxxxxxxxxxxxx> wrote:
Fellow geeks, geekettes, and gurus:

We recently discovered a situation in which data propagation triggers
were applied to several files *twice,* resulting in the data getting
propagated *twice.*

Now in this particular case, there are no other triggers on the affected
files, so it's fairly straightforward to avoid this situation.

But what of the possibility that some other application has a trigger in
the same slot? Is there a way to prevent redundant triggering, without
interfering with somebody else's triggers? I know about trigger names,
but I don't quite understand how they work, and the helptext and error
messages from my attempts to use them are rather unhelpful.

It was so much easier under the old "one trigger per slot" rule.

--
JHHL
--
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-Ups:
Replies:

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.