|
A very simple usage would be to provide a running balance in a header record based upon totals of a field in detail records. For example, if you wanted to keep the year-to-date balance for a General Ledger account you could write a trigger program once that added or subtracted the detail record's amount from the header record's running balance field. Then, trigger the Detail file for *INSERT, *UPDATE, and *DELETE. From then on you never have to worry about the field in the header file matching the detail file, even if someone uses DFU or ODBC or JDBC or SQL or RPG. It is a lot of programming that you never have to worry about again. It just happens. The peace of mind is considerable. -----Original Message----- From: Srinivasan Lakshmi Narasimhan [mailto:narasu@wipsys.soft.net] Sent: Sunday, December 05, 1999 10:54 PM Subject: Re: triggers hi, kindly provide me the actual usage/need for triggers. instead i can go for a program with logic steps of insert/update/delete of records in the relative files as soon as access to parent file is done. is it right /efficient way? s.lakshmi narasimhan +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.