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



This may not be an answer for your question.
But what's your main concern?
The files cannot be left open, because they are wor kfiles that have to be
regularly cleared (with CLRPFM)?

For performance issues and reducing the overhead it is far better if the
files stay opened.
Especially when using (embedded) SQL but also for native I/O in
programs/service programs.
Because the optimization, especially opening the data path is time
consuming, SQL tries to keep the files opened (= Reusable access path).
At the first execution of an SQL statement a FULL Open (complete
optimization) is performed. The most time consuming part during the FULL
OPEN is as mentioned before opening the data path.
For sub-sequent executions SQL tries to keep the ODP (open data path)
opened, so for an sub-sequent execution only the data within the ODP are
updated (PSEUDO OPEN).

If instead of the CLRPFM the appropriate SQL statement (DELETE FROM TABLE)
is performed, all rows/records get deleted, too.
If there is no lock on the file a (under the cover) CLRPFM is performed
otherwise only the rows are deleted.
In this way you don't need to worry about not closed files.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Singh,
Ashwani (Lake Mary)
Gesendet: Thursday, 25.8 2016 18:30
An: RPG programming on the IBM i (AS/400 and iSeries)
Betreff: Files left open

We are experiencing some issues with Files being left open by calling
programs (we are trying to fix these as well by ensuring that programmer are
including the shutdown calls in the service programs they are building etc.)
in our batch processing, causing issues later on when some other program in
the job stream tries to clear the file.

My question is can we find which program has left a particular instance of
file open so that we can identify and correct these issues quickly?


Thanks,
Ashwani
--
This is the RPG programming on the IBM i (AS/400 and 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.

Please contact support@xxxxxxxxxxxx for any subscription related questions.


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