Richard,
Shooting from the hip...
There are before and after triggers.
There are triggers with Allow Repeated Change (ALWREPCHG) set on.
Some of these allow you to do different stuff like update the contents in
between RPG's write op and when it gets to disk. Useful for cleansing
data, adding your own audit fields in the row, etc.
Maybe these lock a row until...

On Thu, Apr 9, 2026 at 12:56 PM Richard Schoen <richard@xxxxxxxxxxxxxxxxx>
wrote:

OK, today I have a question about an SQL trigger on a DB2 file.

Customer has a table they want to put a trigger on. That all works.

And the trigger simply does an insert to another table.

However as soon as they added his trigger, the end-user programs (Old
RPGII interactive rpg programs) that use the table in question experienced
lock-wait conditions.

They are potentially still in the same order doing work once the trigger
goes off.

When a trigger goes off I thought it just received an image of the record
(similar to a journal entry).

This RPGII program does multiple reads, but it also appears to release the
records after each read.

Anyone have thoughts on why a trigger could cause the downstream programs
to suddenly lock up waiting on records once a trigger is added.

Input appreciated.

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx<mailto:richard@xxxxxxxxxxxxxxxxx>

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.