|
Hi, Stephen:
If you make the trigger program run in its own named activation group,
this problem should "go away."is
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
all that is required.Part
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.
inputof these changes meant adding a series of system control files for
areonly purposes.
These control file are used throughout our system for various things
like holding next numbers, environment codes etc so sometimes they
triggerdefined for input and sometimes for update.
Anyway, we are having a problem because the control files in the
controlpgm are currently being left open as the trigger is just issuing a
return. This is causing an issue in that in some programs these
arefiles are being open / closed within the calling program and some
Update).not. e.g Pgm 1 open / closes ctrlfile1 ( ctrlfile1 defined for
openCloses CtrlFile1 - invokes trigger - trigger opens ctrfile1 leaves
can't- return to pgm1 - pgm1 tries to open ctrlfile1 again for update -
infails with CPF5125.
Now I don't want to have to review all usages of the control files
associatesconjunction with where the file hat has the trigger program
withinwith it so best option would be to have a fit all solution made
thoughtthe 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
thethe best way to do this would be to user define the control files in
callingtrigger and ensure they are closed prior to the return to the
theprogram. I'm now questioning myself as I'm unsure that by closing
thereforefile in the trigger will close it in the calling program and
statusstill 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
itof the file in the trigger program or in the call stack. If it does
thewithin the call stack fine if it doesn't then what does my close in
------------------------------------------------------------------------trigger close it in the calling pgm ?
Can anyone offer some words of wisdom.
Thanks
please immediately notify the sender by e-mail at the address shown.CONFIDENTIALITY NOTICE: If you have received this email in error,
========================================================================
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.