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



Another way that you might want to try is to do USROPN on the file. In
the *INZSR subroutine, do a OVRDBF to override to it to SHARE(*NO) and
then open the file.

"Mark S. Waterbury" <mark.s.waterbury@xxxxxxx> wrote in message
news:<mailman.10120.1229459652.13295.rpg400-l@xxxxxxxxxxxx>...
Hi, Stephen:

If you make the trigger program run in its own named activation group,

this problem should "go away."

On the CRTBNDRPG command, or on the H-spec, specify:

DFTACTGRP(*NO) ACTGRP(name)

where "name" is the same as the name of this program.

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

By running in a separate AG, in effect, you are not SHAREing the open
with any other programs in the job.

Cheers,

Mark S. Waterbury

> Brown, Stephen GRNRC wrote:
We have recently made some extensive changes to a Trigger program.
Part
of these changes meant adding a series of system control files for
input
only purposes.
These control file are used throughout our system for various things
like holding next numbers, environment codes etc so sometimes they
are
defined for input and sometimes for update.

Anyway, we are having a problem because the control files in the
trigger
pgm are currently being left open as the trigger is just issuing a
return. This is causing an issue in that in some programs these
control
files are being open / closed within the calling program and some
are
not. e.g Pgm 1 open / closes ctrlfile1 ( ctrlfile1 defined for
Update).
Closes CtrlFile1 - invokes trigger - trigger opens ctrfile1 leaves
open
- return to pgm1 - pgm1 tries to open ctrlfile1 again for update -
can't
fails with CPF5125.

Now I don't want to have to review all usages of the control files
in
conjunction with where the file hat has the trigger program
associates
with it so best option would be to have a fit all solution made
within
the trigger. ( I hope)

I need to make sure that if the trigger program is called that it
doesn't "upset" the calling programs i/o of the control files. I
thought
the best way to do this would be to user define the control files in
the
trigger and ensure they are closed prior to the return to the
calling
program. I'm now questioning myself as I'm unsure that by closing
the
file in the trigger will close it in the calling program and
therefore
still give me an error ?

I then thought of checking the status of the control files in the
trigger using %OPEN but I'm not sure if this only applies to the
status
of the file in the trigger program or in the call stack. If it does
it
within the call stack fine if it doesn't then what does my close in
the
trigger close it in the calling pgm ?

Can anyone offer some words of wisdom.

Thanks


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

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


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.