|
Jack, My favorite answer is "It depends"!! The main thing to remember is that the trigger program must finish processing BEFORE the application program regains control. If you do a lot of processing in the trigger program, submitting a batch job is one way to go, although that is quite a bit of overhead especially if the trigger program is called a lot. Another method for shortening the time the trigger program is active is to have a never-ending batch job that monitors a data queue. The trigger program can then send the appropriate info to the data queue and return to the application program. The never-ending batch program then reads the data queue and performs the long-running process. Using this method adds another "layer" of stuff to keep track of! There is another factor to consider. Does your application program need the trigger program processing to be completed before proceeding. For example, does the trigger update an inventory count that is needed later on in the application program. If so, you're probably stuck with having the trigger program do all the work or reworking your application. FWIW - I use a lot of triggers and I haven't had any of them submit a batch job yet. Hope this helps! Richard -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Jack Derham Sent: Saturday, December 17, 2005 12:24 PM To: MidRange List Subject: Trigger Question To All, A discussion of Triggers the other day got a little heated when one member of the discussion said that IBM recommends that Trigger programs should not be designed to SBMJOB jobs but rather should do all of the processing within the bounds of the trigger program itself. Of coarse, as is almost always the case in these types of discussions, references were very scares, and the group of people quickly became polarized into pro and con camps. My search of the literature did not provide me with any concrete evidence one way or the other so I am turning to an excellent source of technical information to get either literature references or personal experience stories to settle this question in a friendly and logical fashion. The basic question: Should Trigger programs when necessary be designed to Submit Jobs to complete required processing. By the way, A very Merry Christmas holiday to all members. Jack Derham Direct Systems, Inc.
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.