VERY STRONG SUGGESTION:
Assuming you want real time but not synchronous in the transaction, and you
don't want to slow down the application process, strongly consider building
a data queue system to accomplish the task.
The Trigger does nothing more than grab the data you want and enqueue an
entry on a data queue. Could be keyed nor not, set up the way you like it.
Now build a data queue processing program that will take a queue entry and
do what you need with it. Many of them could be running so there's no
chance it will fall very far behind if at all.
The trigger moves extremely fast, does not slow down production transactions
and while it's asynchronous it does not feel that way since the data queue
programs keep ahead of the trigger.
Last year I had too many customers implement triggers without thinking it
through all the way and we wound up with transactions that went from
microseconds to many seconds waiting on triggers. Worse, they set up
cascading triggers and really bolixed things up. In one case a series of
cascading triggers ended up causing themselves to fire again, and the system
wound up tight to absolute capacity, causing use to kill the partitions from
the HMC. Bad.
Triggers are wonderful, until they are not.......
--
Jim Oberholtzer
Agile Technology Architects
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> On Behalf Of Rob Berendt
Sent: Friday, January 04, 2019 11:46 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Handling Record Change Journal Entries
"real time"
I would think this would be a better fit for a trigger.
If you just want to log the changes then using the 7.3 temporal table stuff
ROCKS!
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzahf/rzahftemporal
table.htm
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.