×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Pretty big I'd guess....but it should be easy enough to test for yourself..

(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 <jamesl@xxxxxxxxxxxxxxxxx> wrote:
How much overhead would you say is involved in making files *USROPN, and
keeping them open only while actually performing I/O on them, as opposed
to doing things the usual way?

We're thinking of doing this in a trigger program, in order to cut back
on the number of file locks.

--
James H. H. Lampert
Touchtone Corporation

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

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.