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



No.

FTM:
http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/topic/dbp/rbafoopenc.htm

"Make sure that when the shared file is opened for the first time in a job
or activation group, all the open options needed for subsequent opens of the
file are specified. If the open options specified for subsequent opens of a
shared file do not match those specified for the first open of a shared
file, an error message is sent to the program. (You can correct this by
making changes to your program or to the Open Database File (OPNDBF) or Open
Query File (OPNQRYF) command parameters, to remove any incompatible
options.)

For example, PGMA is the first program to open FILE1 in the job or
activation group and PGMA only needs to read the file. However, PGMA calls
PGMB, which will delete records from the same shared file. Because PGMB will
delete records from the shared file, PGMA will have to open the file as if
it, PGMA, is also going to delete records. You can accomplish this by using
the correct specifications in the high-level language. (To accomplish this
in some high-level languages, you might have to use file operation
statements that are never run. See your high-level language topic collection
for more details.) You can also specify the file processing option on the
OPTION parameter on the OPNDBF and OPNQRYF commands."


Charles


On Tue, Dec 16, 2008 at 4:17 PM, Brown, Stephen GRNRC <
Stephen.Brown@xxxxxxxxx> wrote:

Charles,

If I adopt this approach of defining the file for update, will this not
give me an issue if the calling program opens it for input and the
trigger opens for update.






-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: 16 December 2008 21:04
To: RPG programming on the IBM i / System i
Subject: Re: Trigger program - open / close file question


On Tue, Dec 16, 2008 at 3:34 PM, Mark S. Waterbury
<mark.s.waterbury@xxxxxxx
wrote:

This is probably "safer" than opening the file for Update when Input
is all that is required.


I don't see that opening an input file for update is all that unsafe.
How hard is it to make sure you don't issue a WRITE or UPDATE?

In any event, the real problem with running a trigger program in another
AG is that any changes made by the trigger program can no longer be
included under the same transaction as the changes that caused the
trigger to fire.

This is why IBM recommends trigger program run as ACTGRP(*CALLER).

Charles
--
This is the RPG programming on the IBM i / System i (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.





------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: If you have received this email in error, please
immediately notify the sender by e-mail at the address shown. This email
transmission may contain confidential information. This information is
intended only for the use of the individual(s) or entity to whom it is
intended even if addressed incorrectly. Please delete it from your files if
you are not the intended recipient. Thank you for your compliance.
Copyright 2008 CIGNA

==============================================================================

--
This is the RPG programming on the IBM i / System i (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.

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.