|
Another option is to use the journal instead of a trigger. Vijaykrishna_Malladi wrote:
Hello folks, I have a Query on triggers in AS400. We have an update trigger program (coded in RPGLE) on a Physical file which writes 2 records for an update (Before Image, say BI and After image, say AI of the record being updated in the PF) into another PF which we call as a history file. We want to process the History file in the same sequence, i.e., the BI and AI should be in pairs. so that we can read them sequentially and by the change code field in the 2nd file, we determine whether it is BI or AI. My problematic situation is: Suppose if two batch programs are updating the same file, there may be a chance that a BI for one of them is written in the History file and before the AI is written, the BI of some other record update would be written (even though, we have coded the write statements for the BI & AI, immediately one after other). This may happen because AS400 is very fast. Actually will this happen? if a trigger program is running, will it run only in one instance? or multiple instances is also possible at the same time? Any help in this would be highly appreciated. Since we are executing a big project based on this here. Thanks in Advance, Regards, Vijay
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.