|
We have recently made some extensive changes to a Trigger program.can't
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 -
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. Thisif
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
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 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.