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



Is this really an issue? How often does one CLRPFM a file with triggers on it? I can't imagine just whilly-nilly performing a CLRPFM on our item master table.
I suppose if you had a batch header table and a batch detail table and the trigger on the detail updated the summary in the batch header table might be an issue. Is this the case?

I would not delete the triggers. Just turn them off/on as needed. This is what replication H/A solutions do on the target systems. See below for sample.

create table rob.oktrig (mycol char(5));

create table rob.oktrigcnt (nbrtrig int);

insert into rob.oktrigcnt (nbrtrig) values(0);

create trigger rob.addem
after insert on rob.oktrig
FOR EACH ROW MODE DB2SQL
update rob.oktrigcnt set nbrtrig = nbrtrig + 1;

create trigger rob.dropem
after delete on rob.oktrig
FOR EACH ROW MODE DB2SQL
BEGIN ATOMIC
update rob.oktrigcnt set nbrtrig = nbrtrig - 1;
end;

insert into rob.oktrig values('hi');

call qcmdexc('clrpfm rob/oktrig');
Trigger program or external routine detected an error.

alter trigger rob.dropem disable;

call qcmdexc('clrpfm rob/oktrig');
CALL statement complete.

alter trigger rob.dropem enable;

Of course, at this time the value in rob.oktrigcnt is inaccurate, as you disabled the 'nbrtrig - 1' logic.

Rob Berendt

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.