×
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.
Here's some sample script I used to set this all up to test how a
particular HA vendor handled triggers. I replaced two dashes (used for
commenting) with dashdash due to how this list handles a dashdash.
Basically what happens is that if you add a row to one table(rco) then it
updates a count of rows in the table rcocount.
There are ways to get even more detail with trigger programs, both written
in RPG or SPL. For example, if the new.wage is greater than a certain
multiple of the old.wage then perform some action.
See also ADDPFTRG. I can shoot you a sample RPG trigger program I've used
which looks at the old and new.
dashdash
dashdash Test trigger
dashdash
set schema MYTESTLIB;
create table rcocount (
NbrRco int
);
insert into rcocount (NbrRco) values (0);
Create trigger Rco_Counter
after insert on rco
for each row
secured
update rcocount set NbrRco = NbrRco + 1
;
dashdash Verify replication of trigger on both machines
select *
from qsys2.systriggers
where trigger_schema = 'MYTESTLIB'
;
select *
from backupsystem.qsys2.systriggers
where trigger_schema = 'MYTESTLIB'
;
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.