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



Jeff,

Why must the trigger program check if the processing program is active? That shouldn't be done in the process that fires the trigger. Do that with some sort of scheduled job to occasionally check if the process monitoring the data queue is active.

Why must the trigger determine if the data queue exists? I'd just have the trigger program push an entry into the data queue. Monitor or trap that push into the data queue for an error. If you trap a 'data queue doesn't exist' error then do something about it.

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Young
Sent: Friday, June 17, 2011 11:34 AM
To: Midrange Systems Technical Discussion
Subject: Re: Trigger Processing Question

Hi Paul,
That is basicaly what I am doing, but I need to determine if the data queue
exists and if the processing program is active.
I have a program that will do that, but what is the best way for the trigger to
call it so that if needed I can make adjustments to it without having to
worry about what version the trigger is actually calling.

Thanks,
 
Jeff Young
Sr. Programmer Analyst






________________________________
From: "Morgan, Paul" <Paul.Morgan@xxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Sent: Fri, June 17, 2011 10:43:08 AM
Subject: RE: Trigger Processing Question

Jeff,

Fire off an entry into a data queue from the trigger program.  Have another
process already running which is monitoring the queue and processes the entry to
call the other program to do some other processing.  It's possible for you to
shut down the process and restart it to make changes to the other program.  As
long as the data queue is available the trigger program can continue to fire
entries into the queue.

I wouldn't do any checking for a data queue or process in the trigger program. 
Neither would I submit a job or call the program from the trigger program.  You
want to reduce as much as possible any possibility of an error or delay with the
trigger program.

If you want to make changes to the trigger program you should use the Trigger
Mediator pattern.

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jeff Young
Sent: Friday, June 17, 2011 10:27 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Trigger Processing Question

V6R1
I have a trigger program that is going to be called thousands of times during
the day.
This program will test some fields in the old and new record and then fire off a

program to do some other processing if they are changed.
At this time this is the only trigger being used, so the Trigger Mediator
program is overkill.
I want to be able to make changes to the program doing the proessing if needed.
I will initialy call a program to test if  a data queue exits and if the
processing job is already active and waiting for a message.
If not, the program will create the data queue and then submit the processing.

What is the best method to call this program?
 Dynamic call from the Trigger?
Submit job to batch ?
Some other method?

All suggestions will be appreciated.

Thanks,
 
Jeff Young
Sr. Programmer Analyst

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.