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




On 20/03/2008, at 5:45 AM, Arthur.Marino@xxxxxxxxxxxxxxxx wrote:

Today, I was testing a program that opened a file before the service pgm
proc was initially invoked. In debug, I was surprised to see that the proc
decided that this file was NOT open, so it opened it. When I looked at my
job's open files, I saw the open file twice. And both were in the same
Activation Group (QILE).

This is the expected behaviour. Each program or service program that issues an explicit or implicit open to a file will perform a full open of that file and each will appear in the list of open files regardless of the activation group of the opener. The only way to reduce this is by performing shared opens. The list of open files will show whether a file is opened for sharing the ODP and how many times it has been opened in this manner.

Since I'm apparently wrong about file opens/closes in a service program,
can someone enlighten me? Thank you.


I presume you are using %OPEN to progammatically determine whether a given file is open or not. This works only within the module. It is not affected by operations to that file outside the module.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.