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



Hi Dieter,

I'm not sure I agree - I think I CAN control the environment:

I'm using the LIBRARY on the trigger buffer. That tells me unequivocally
which library the file is in.
All my triggers run in a named activation group.
I am overriding all file access using an activation group override which I
remove at the end of the trigger.
The overrides specify Secure( *Yes )

I can't at the moment see why this wouldn't work - do you think there is a
problem?

best regards,
Craig

On 23 February 2018 at 10:37, D*B <dieter.bender@xxxxxxxxxxxx> wrote:

<Craig>
I agree that as you say, once added, the trigger program is qualified it
will always be located when the trigger on the table fires.
I was really only asking about whether it's usual to force the trigger to
use files in the same library the file triggers from, and if there was a
simpler way in SQL triggers than doing what I'm doing with an RPGLE program
trigger - either overriding or qualifying all file access )
( for example, I wondered if the more SQL-Trigger savvy would start
shouting at me, something like: USE AN SQL TRIGGER AND SET SCHEMA YOU
MUPPET! )
So far that hasn't happened...

I can see that in general the problem is bigger than just the data - as you
point out - if the trigger program had a requirement to call other programs
then that would be an additional concern but thankfully in my case it is
not required.

So I guess your last sentence is the one that interests me the most - "use
SQL for all I/O operations and qualify in all statements"

Given that I will mostly ( I hope ) only be dealing with 4 or 5 files in
each trigger I think for safety I will qualify all file access.
</Craig>

Have in mind, that you can't controll the environment the trigger is
running in!!!

you can't rely on naming SQL or SYS, you can't rely on current schema,
curlib, libl; you don't know, wether OVRDBF was used outside, OVRSCOPE and
...

Don't make the qualify hardcoded, look at the PSDS from wich lib the
trigger was called and use this lib as a qualifier.


D*B


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


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.