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



Thanks for the this and the other email referencing the conditional commit 
keyword. I found an example I am going to try out in my trigger. If it 
works all my triggers will have it from now on, just in case.



"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
11/14/2006 01:56 PM
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: Commitment control and triggers






As far as I can recall, you will need to add COMMIT keyword on F spec of
all files that the trigger program is updating.  Trigger program should
normally not executing the commit/rollback, the caller will do that.

You can condition the COMMIT keyword on the F spec.  I think somewhere
in the input param will tells you if you are under commitment control.
It has been awhile.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob P. Roche
Sent: Tuesday, November 14, 2006 1:48 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Commitment control and triggers

The main program is doing the rollbacks fine. The problem I need to
address is getting the trigger to roll back its file updates at the same
time. I Can't add the commitment directly to the trigger because it wont
know when the high level program does a rollback, Currently in test I
move an order from one date to another on my screen and the tracking
data is written out. If I hit F3 the order move is rolled back but the
original tracking that the move was done is not. 



"Glenn Gundermann" <ggundermann@xxxxxx> Sent by:
rpg400-l-bounces@xxxxxxxxxxxx
11/14/2006 01:31 PM
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: Commitment control and triggers






I can't remember what happens but it's easy enough to test, right?  Just
do a rollback in the trigger program and see what happens.

But how about another way.  Why not send an escape message from the
trigger program and then the program that created the condition would
monitor for this and then rollback the changes itself.

Just an idea.

Glenn Gundermann
ggundermann@xxxxxx
(647) 272-3295

I am adding commitment control to a program that updates a file. There

is
a trigger on the file to write tracking records to a different file
whenever a change is made. Is there a way to get the trigger to
rollback
it's changes when I use the ROLBCK opcode in my program?

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.