×
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.
Hopefully you won't learn the second lesson the hard way.
When you use an "intermediate" trigger program you are setting yourself up for some possible pain. IBM didn't set triggers up to require an exclusive lock on the triggered file to change the trigger program just because they felt like it.
Using an intermediate trigger which then calls another program(s) to do the work can cause some real havoc when making modifications to the called program(s). Any job that had fired the trigger before the change will still use the old program(s), any jobs that fire the trigger after the change will use the new program(s).
In most cases this may not be a big problem, but if you make fundamental changes to the trigger program(s) you could cause some major headaches.
Duane Christen
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Kesterson, Randy
Sent: Monday, September 08, 2008 9:41 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Question about opening and closing files
You can play around with all kind of scenarios, but you should do yourself a favor and do not have the "Trigger" program open any files. The trigger program will receive the entire before and after fields of the file being triggered along with what kind of an event it was. Have your trigger program analyze the event and call another program to handle that event. That way, you'll never have to recompile your trigger program unless you literally change the file's physical format.
The biggest problem with a trigger is it's usually over a file that every uses a lot. To recompile the trigger program you have to un-trigger the file. To remove the trigger you have to have everyone out of it and that means lost production time. If, however, the trigger program does nothing more than direct traffic, you can make all the changes you want to the traffic programs without having to un-trigger the file.
We learned this one the hard way. We have about a dozen files triggered. Every trigger program we have is, with the exception of the names, exactly the same. Determine if it's a 1, 2 or a 3 (Add, Delete or Update) and call the appropriate program to handle it.
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: Question about opening and closing files, (continued)
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.