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



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2011-03-09 12:38, David Gibbs wrote:
James Lampert wrote:
In a trigger program, what's the easiest way to determine what
program tripped the trigger?

Since the trigger is invoked in the current job, you might be able to send a message up the message queue to find what program caused the program to invoke.

david


For a batch job, once a suitable problem instance is identified, I
usually build a test environment containing it, then create a test
trigger from the production version with a little code to filter on the
values I'm looking for, something like this:

If ORIGINAL_CUSTOMER = 9999 or NEW_CUSTOMER = 9999
XXX = 1;
EndIf;

Then I put a breakpoint on the assignment, run the job, and wait until
it breaks. Looking at the program stack tells me exactly where the
problem came from. I can even add the offending program to the debug and
browse the variables in it for more information. Works pretty well in
situations where the problem could come from a lot of different programs.

hth

- --
Pete Hall
pete@xxxxxxxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk14K2IACgkQXczQcKdXKg6NnQCeIxVpd3uzJ8303RuRJxTgrqYJ
AKwAoICKoEwqT0TI+hF0RdTEwh1Au/a2
=eVXh
-----END PGP SIGNATURE-----

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.