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

All,
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

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