× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

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.