|
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Brown, Stephen GRNRC
Sent: woensdag 7 januari 2009 10:14
To: RPG programming on the IBM i / System i
Subject: RE: Trigger program - open / close file question
Scott,
Hope you can still comment on this. I went with the approach that you
suggested below and everything worked fine until ...
We have another application however that updates / writes to the file
with the associated trigger program. This application is separate from
our main system but does reference some of the files. This application
is build over a service program / activation group. I seem to be
getting
an issue with the override I am setting in the trigger, specifically
the
level that it is being set at (OVRDBF not being set then the DLTOVR
fails). I need this override to work for standard OPM RPG programs and
ones that run within the specific activation group. I know I can change
the OVRSCOPE to *ACTGRPDFN but I am not sure if this will cause me
further issues or if there is a better way. Alternatively I can also
use
the error extension of the callp on the ovrdbf and dltovr. Any pointers
for me.
Thanks Stevie
Example code from trigger
Eval wCmd = %Trim('OVRDBF File(HSCTLL) ' +
'SHARE(*NO) Secure(*Yes) ' +
'OVRSCOPE(*CALLLVL) ')
CallP qCmdExc(wCmd : %Len(wCmd))
If not %Open(HSCTLL)
Open HSCTLL
Endif
Eval wCmd = %Trim('DLTOVR File(HSCTLL)')
CallP qCmdExc(wCmd : %Len(wCmd))
As an Amazon Associate we earn from qualifying purchases.
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.