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



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


Opening and closing CTRfile1 in trigger will resolve the issue in this
instance as PGM1 then tries to open CTRfile itself and should be
successful. But will this work in calling pgms that the CTRFile is not
USROPN, i.e if closing in trigger will this also close file to calling
pgm. I don't think it does but I'm having a moment of doubt.


The CLOSE opcode would only effect the trigger program.

But you really don't want to OPEN/CLOSE the file in the trigger each time.
That will kill your performance.

With the file defined SHARE(*YES), it is up to the application to make sure
that the file is opened for update by the first program to open it if _any_
program may need to open it for update.

Your trigger program is effectively the first, since the prior program
closed the file, thus your trigger need to open the file for update. Since
it doesn't need to update anything, just make sure it does all input with
(n) so that the records won't be locked.

Otherwise, you need to ensure that some other program which does open the
file for update, opens the file and leaves it open before your trigger
program is called.

Charles

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.