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



To answer your problem:

Triggers are run per job as they are linked to the PF.
You may have mixed inserts by different jobs, but jobs can write data to the 
history file per record blocks. (check the complie listing of your trigger 
programme, otherwise BLOCK(*YES) on the F-specs ).

Why do you not put the before and after image in one record? I assume you have 
the external described DSes PREFIXed.

Give the history file the same unique key as the original PF and add the change 
code to that key, if you want to stick to a records per image.

Regards,
Carel Teijgeler

*********** REPLY SEPARATOR  ***********

On 9-7-05 at 2:06 Vijaykrishna_Malladi wrote:

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




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.