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


  • Subject: Re: Open files after programs ending
  • From: fkolmann@xxxxxxxxxxxxx
  • Date: Wed, 08 Sep 1999 08:42:33 +1000



DAsmussen@aol.com wrote:

>   In order to speed processing, some of the BPCS API's have been modified to
> perform a "return" rather than an "end program".  This leaves files open so
> that the resource-intensive process of opening them doesn't have to be
> performed every time the program is called.
>
> Leaving files open in an API is a rather elegant solution -- right up to the
> point that programs calling the API never tell it to "end program" and close
> the files.

Am I stupid and/or has something about the AS400 changed.
When I code for leaving files open I was under the impression that one needed to
use OVRDBF SHARE(*YES) and also have a file opening program at the top of the
call stack.  Otherwise it does no good at all to just do a return, when you call
the program next time it will open another ODP on top of the one already open.
If a program is called many times u end up with hundreds of ODPs in the PAG.
Rather than speed up things the reverse happens, u clog up memory and the jobs
still create ODPs on every call.  I have seen evidence of hundreds of files open
in BPCS jobs with repeated opens of the same file.  I am puzzled by seeing the
number of files increase then decrease as if there was some sort of cleanup
happening.  Just cannot fathom it.



+---
| This is the BPCS Users Mailing List!
| To submit a new message, send your mail to BPCS-L@midrange.com.
| To subscribe to this list send email to BPCS-L-SUB@midrange.com.
| To unsubscribe from this list send email to BPCS-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: dasmussen@aol.com
+---


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.