number 5 is only true when there is a *DELETE trigger on the file, if no
delete trigger is in place and active you *can* clear the file using
CLRPFM. even with a delete trigger the file can still be cleared by using
SQL delete statement
Thanks,
Tommy Holden
From:
"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
To:
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Date:
06/09/2008 09:17 AM
Subject:
RE: Trigger programme without a trigger.
Below are some not so traditional-RPG-programmer friendly things about
trigger (They are not problem, just stuffs that traditional RPG
programmer are not familiar with):
1) Commitment control issue. Programmer that creates trigger program
tends to not consider commitment control. If the file is under
commitment control and trigger is not, roll back will not rollback what
trigger has done. Well, depending on what the trigger is doing, this
might not be an easy fix.
2) When use CRTDUPOBJ, the trigger get duplicate over to the To-File
also. Programmer sometime dup file to QTEMP to do some temporary work.
This could be dangerous if he does not intend to have trigger fired on
this QTEMP file.
3) Speed (This could be a problem if the file gets update/add
frequently).
4) Can't easily remove trigger. Must have excusive lock on the file to
do so. I know Alan has a mediator program that can "turn it off",
however, if speed is every important due to major issue, it might not
work well since the mediator program will still get call for every
update/add.
5) Can clear the file without removing trigger.
I'm not against using trigger, I just notice that above are things that
irritate traditional-RPG-programmer.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of David Gibbs
Sent: Tuesday, June 03, 2008 10:26 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Trigger programme without a trigger.
David FOXWELL wrote:
I hear there are occasional problems when a trigger program is
involved, although I don't have a lot of experience with these. I've
just created a new transaction file and the boss says no trigger. The
trigger on the master file already fires off all over the place and
can be a pain in the neck while developping.
What kinds of problems have you heard about?
Did your boss say WHY he doesn't want you to use a trigger?
This is really a case of using the right tool for the job ... and, for
what you want, a trigger is the right tool. Perhaps you can explain
this to your boss.
david
--
IBM System i - For when you can't afford to be out of business
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.