James,

You can test the trigger event from the trigger buffer, the events have
values 1, 2 or 3 for Insert, Update and Delete (respectively, IIRC). So you
do not have to test an error when sending and receiving a message to one of
those DB-PGMs.

When using (sub)procedures or service programmes you may have to raise the
call stack level.

With regards,
Carel Teijgeler



*********** REPLY SEPARATOR ***********

On 4-9-2008 at 11:14 James Lampert wrote:

Modifying Richard Ecuyer's example from February 2006:

http://archive.midrange.com/midrange-l/200602/msg00666.html

with

c Eval pm_counter=1
c movel 'QDBUDR ' Pm_CSEntry

and then, if the first QMHSNDPM call fails with CPF2479, calling it
again with
c movel 'QDBPUT ' Pm_CSEntry

I get the name of the program that immediately tripped the trigger.

I noticed a lag in the response time, so to determine whether it was in
the API calls or in the DSPLY statement, I added a couple of timestamps,
one before the first QMHSNDPM call, and one after the QMHRCVPM call,
DSPLYing them both just before the final DSPLY with my result, and found
that the API calls only took 2-4 milliseconds on a "slim" 170 running
V4R4, so I guess I'm OK on time.

But can anybody think of a case (or an OS release) where climbing one call
stack level beyond the QDBUDR/QDBPUT call might fail to return the
right program? Or explain why Ecuyer's example just climbed a straight 5
call stack levels, overshooting the target by 2 levels?

--
James H. H. Lampert
Touchtone Corporation

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


No virus found in this incoming message.
Checked by AVG.
Version: 8.0.101 / Virus Database: 270.6.14/1646 - Release Date: 1-9-2008
18:03




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-2019 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].