Scott,
The override is definitely being executed.
The ovrdbf / open / dltovr is within *INSZR subroutine so it's not being
done all the time as you put it but point taken it should all be within
a Not Open statement to be consistent.
The reason I mentioned the actgrp(*Caller) is if I compile the trigger
without this the DLTOVR works.
Anyway thanks for your input on this.
Cheers Stevie
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: 07 January 2009 19:18
To: RPG programming on the IBM i / System i
Subject: Re: Trigger program - open / close file question
Brown, Stephen GRNRC wrote:
Has this something to do with fact my trigger program is compiled with
ACTGRP *CALLER.
ACTGRP shouldn't matter at all, since your override is
OVRSCOPE(*CALLLVL) -- which means the activation group is not related to
the override scope.
ACTGRP(*CALLER) is the right value for a trigger, because if you use
commitment control, you want the trigger to run in the same commitment
definition as the program that's writing the records. But, that
shouldn't have any impact on overrides...
I don't know why this is happening... you run the OVRDBF and 4 lines
later (in the same program/same call level/same activation group), the
override is missing. That doesn't make sense.
Are you sure there's no condition where the override might not have been
executed, but the DLTOVR is being executed?
I'm curious as to why you do the ovrdbf/dltovr all the time, but only do
the OPEN if the file isn't already opened. What good does that do? The
OVRDBF only affects the OPEN statement, right? So why not have the
OVRDBF and DLTOVR conditioned by the same "if not %OPEN" group? Sorry
-- nothing to do with the problem, it just struck me as odd.
As an Amazon Associate we earn from qualifying purchases.