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



So, which is it? I've never had a need to research this, but I've always
been curious. How does it really work?

I believe the library list used by an RPG trigger program (regardless of
whether it uses sql) is the library list of the job which causes the
trigger to be invoked if you use the *SYSNAMING naming convention when
you create the trigger program.

That's not the same as the library containing the trigger. Assuming
*SYSNAMING again, if the trigger is added with the context *LIBL, using
the ADDPFTRG command, the trigger definition in the table containing the
trigger, contains the context/library where the trigger program was found
by the ADDPFTRG command. Any resources the trigger program needs must be
in the library list, or the trigger operation fails.

With *SQLNAMING, it's different. Very limited experience here, as I
seldom do it, but I believe either the current context must be the
context in the SYSTRIGGER table (view of QADBXTRIGB), or the trigger name
must be qualified with the context name when the trigger is added, and
all external resources must be in the current context unless the context
is explicitly specified in the trigger. That could be something like
"select a.* from foo.mytable a" to access mytable in library (context)
foo, where foo does not need to be the current context.

Yes, no, maybe?


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.