Have you thought about decoupling the inventory update from the programs?

Something like replacing the update inventory line with a call to a program (or module) that actually does the table update? This way you can determine which process is providing a negative value. I don't recommend changing the value of a field though. Better to track where the errant value comes from and fix it a the source. This is much easier to explain to auditors.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Young
Sent: Friday, May 30, 2014 8:16 AM
To: Midrange Systems Technical Discussion
Subject: Update a field in a file from the trigger on the same file

I have a file that I want to monitor for a change to a specific field.
If this field becomes negative, I want to set it to zero.

The file is updated by many programs and is my inventory master, so there
are a large number of transactions all day.

Is a trigger the best way to do this?
If not, what would be the best method with the least impact on performance?
If so, what is the impact on performance?

The system is at release V7R1M0 L00 TL12115

Jeff Young
Sr. Programmer Analyst

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page