Rob,
Yes, that is why I say I'm not against it. However, of all those 5
things that I mentioned, the only one that is kind of hard to handle is
commitment control. To handle it correctly, one might need to give up
some speed. For example, I've heard somebody say that to increase the
speed I'm going to have trigger program dumps the input buffer to a data
queue and have another batch process picks up the data from that data
queue and processes it. Well, first of all data queue does not really
goes well with commitment control. Secondly, the programmer that create
the program to update the file under commitment control might not know
that the trigger program will not handle rollback. Yes, it can be
fixed, it just not as easy. :)
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Monday, June 09, 2008 9:48 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Trigger programme without a trigger.
I think you also left off that a "traditional" RPG programmer often
makes "assumptions" about WRITE or UPDATE errors and often doesn't check
%status. Oh, got an error on a WRITE? Let's assume it was a duplicate
key error.
Now, let's upgrade this programmer a little. They now check %status.
Trigger error? How do I determine what the error was? I have to check
the job log, or program message queue, to see what exception message
that the trigger program threw? I'm too lazy for that and I've never
had to do that on a S/34 therefore trigger programs are evil. They
require me to change!
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
06/09/2008 10:24 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc
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.