Buck,

If you look at the call stack when a trigger executes (for an update, but I assume the other events work the same way) you see 2 entries between the program issueing the update and the trigger program:
- Procedure _QRNX_DB_UPDATE in service program QRNXIO, which has *CALLER
- Program QDBUDR, which runs in the default activation group (0000000001 - the sytem part).


Apparently QDBUDR performs the same trick as QCMDEXC; it passes the activation group from the caller to whatever it calls.

Joep Beckeringh



Buck Calabro wrote:
*CALLER means that the AG is
inherited from the program that calls it.

But, apparently triggers are the exception
to that rule -- something that I didn't know
until now. Instead of inheriting the
activation group of the database manager,
the system activates it in the AG of the
program that made the database call.


The way I always thought of it, the DB manager is set to *CALLER too.
That way, the DB code runs in the same AG as the updating program, so
program, DB and trigger all run in the same AG.
  --buck


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.