|
Charles,
Why should trigger programs end with *INLR=*ON?
Thanks,
Crispin.
----- Original Message -----
From: "Charles Wilt" <charles.wilt@xxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, September 09, 2008 10:59 AM
Subject: Re: Question about opening and closing files
No of course not.
But a trigger program should never be ended with *LR = *OFF anyway.
So alarm() might work.
Charles
On Tue, Sep 9, 2008 at 10:03 AM, Lim Hock-Chai
<Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote:
Are you saying that the alarm() api can actually wake up an in-active--
program (ended with *inlr = *off)? That would be cool if this is true
:).
"Charles Wilt" <charles.wilt@xxxxxxxxx> wrote in message
news:<mailman.9454.1220926197.2545.rpg400-l@xxxxxxxxxxxx>...
Pretty big I'd guess....but it should be easy enough to test foryourself..
<jamesl@xxxxxxxxxxxxxxxxx> wrote:
(Maybe) a better idea:
Come up with a way to have the trigger program wake up after a few
minutes and close its files. This way, if your changing 100s of
records at a time, you'll only have to pay for one open/close.
Question is how to do the wake up?
First thought is to use alarm() API along with the appropriate signal
handling APIs.
BUT I don't know that trigger's play well with signals...don't know
they don't either. <grin>
Another possibly easier option:
Look at why is the file open an issue in the first place. Can you
make it not an issue? For instance, once place I've had trouble is
with a process that uses CLRPFM to clear a work file when that process
is called by an ODBC/JDBC client. Instead of a CLRPFM, I sometimes
will use an SQL DELETE. Or I'll change the program reading the file
to delete the record after it reads it. Consider adding
REUSEDLT(*YES) to the file.
HTH,
Charles
On Mon, Sep 8, 2008 at 8:47 PM, James Lampert
andHow much overhead would you say is involved in making files *USROPN,
opposedkeeping them open only while actually performing I/O on them, as
backto doing things the usual way?
We're thinking of doing this in a trigger program, in order to cut
mailing liston the number of file locks.
--
James H. H. Lampert
Touchtone Corporation
--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
--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.
This is the RPG programming on the AS400 / iSeries (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.
This is the RPG programming on the AS400 / iSeries (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.
--
This is the RPG programming on the AS400 / iSeries (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.