Craig, you might be able to glean some info from this midrange-l
link/thread.
https://archive.midrange.com/midrange-l/201801/msg00984.html
I posted a slightly similar question to the group recently and there are
some great ideas in the thread.
We decided to go the journaling route for our purposes.
hth,
John
<snip>
Hi all,
I have a trigger program where updates to the table could come from:
1. The general application / support staff OR
2. An Application Server processing messages coming in from an external
system.
- If an update is caused by 1. then message needs to be sent out to the
external system.
- If an update is caused by 2. then the external system instigated the
update and therefore does not require a message.
A given trigger program can always determine the Application Server
program
relevant to the file it's on and therefore one way to determine if it is
case 2 would be to check if that program was in the call stack, by using
an
API ( quite expensive I think? ) or trying to send a message to a Program
Queue of that name ( will fail if it's not in the call stack )
These seemed like OK solutions if they could be done once at
initialisation
and remembered, but that's not a great idea in a trigger program...
And I fear that the call stack one is a bit expensive to do every time and
the program message one will fill up the joblog....
So I'm wondering about other non-expensive ways to determine in the
trigger
program if it needs to send out a message. Some simple but not foolproof
things that occur to me are:
- Job User or Name if this can be guaranteed to only be used in case 2.
- Jobs in case 2 will have their own subsystem but I can't see that
attribute on the QWCRTVCA API.
- Accounting Code seems to be linked to User Profile or JOBD and can't
be changed on the fly.
Anyone know of a very inexpensive way to tag a job that could be utilised
in a trigger program.
Thanks and regards,
Craig
</snip>
John Rusling
Senior Developer/Analyst
Quadion LLC
Minnesota Rubber & Plastics
952.927.1419
“In a world of ambiguous column names... why wouldn't you use PREFIX?”
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.
As an Amazon Associate we earn from qualifying purchases.