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



That is all very good information but does not answer the question at hand. How to determine what program left the file locked after the program has ended. There are some files in our system that hold the lock when people are out the program and back to the menu. I have not found an easy way to see what program left the file locked (file member in this case). Since the program has already ended, there may not be an easy way.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jose Perez
Sent: Thursday, August 25, 2016 1:54 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: Files left open

Use WRKOBJLCK, besides be aware of this your process should not leave any file open once it finish, if you have service program using Return instead of *INLR=*ON this keep the file open. Local files used in a procedure ( If you code an F spec after a P spec, then that file is local to the
subprocedure.) are automatically close once the procedure end now if you use STATIC keyword on your local file,that means the file will remain open at its current position and keep open between calls of procedures, file will be close when at the very end of your process you use the operation code CLOSE, instead if file is Defined as a Global File (Before or outside of a procedure P and program does not have Main or NOMAIN keyword) then this kind of file should be close once you do *INLR=*ON, other way to get rid of your issue is to determine when to open and close the file and this can be done using the keyword USROPN when defining the file and then Open when needed and close it when no needed.

On Thu, Aug 25, 2016 at 12:30 PM, Singh, Ashwani (Lake Mary) < Ashwani.Singh@xxxxxxxxxx> wrote:

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:
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.midrange.com
_mailman_listinfo_rpg400-2Dl&d=DQICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLu
nI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=eVQZsBbv
6lUHyhfJJdRvQxXNxkYSqysidpZ-ygzPFqM&s=iwN0g8nyrGTMHL_KpocbUwuEf4ad_V7S
trrzYh6OAKU&e= or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
please take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=http-3A__archive.midrange.com_rpg400-2Dl&d=DQICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=eVQZsBbv6lUHyhfJJdRvQxXNxkYSqysidpZ-ygzPFqM&s=2qNYbvZuAGHR9kOpGyKGUPnoX5KvkldS9EsqVqITjdY&e= .

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
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: https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DQICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=eVQZsBbv6lUHyhfJJdRvQxXNxkYSqysidpZ-ygzPFqM&s=iwN0g8nyrGTMHL_KpocbUwuEf4ad_V7StrrzYh6OAKU&e=
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=http-3A__archive.midrange.com_rpg400-2Dl&d=DQICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=eVQZsBbv6lUHyhfJJdRvQxXNxkYSqysidpZ-ygzPFqM&s=2qNYbvZuAGHR9kOpGyKGUPnoX5KvkldS9EsqVqITjdY&e= .

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.