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



We also have trigger programs that need to open different files depending on the environment they are run in.

As I'm personally not very fond of OVRDBF (I _hate_ it), we took the ExtFile(lib/file) + UsrOpn approach.

Maybe this can be a solution for you as well?

Just my 2 euro-cents.


Peter Colpaert
Software Engineer, Philips Consumer Luminaires

Industrieterrein Satenrozen 11, 2550 Kontich, Belgium
Tel. +32/ 3 450 74 09, Fax +32/ 3 450 74 33, Internal 1317
peter.colpaert@xxxxxxxxxxx, www.philips.com

Simply Switch to printing double-sided and printing less






-----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))



The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

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.