Highlighted
Absent Member.
Absent Member.
1352 views

[archive] Number of open files/MAX-FILES

[Migrated content. Thread originally posted on 05 April 2004]

We have an application which performs production scheduling of interrelated components. The availability/scheduling of one component directly affect the availability/scheduling of others. What this means is that a change to one component may cause other components to be rescheduled, any component that is rescheduled could force the rescheduling of other components.

The code that performs this function is done using several programs that can recursively perform themselves. The problem is that when this is updating we are running into the MAX-FILES limitation of the Acucobol-GT runtime.

What I'm trying to determine is if there's any way to tell what 'pass' I'm on and not perform recursive iteration. Does anyone know how to do something like that?

Does anyone have anywhere near the maximum number of files open?

Brad Hayes
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Number of open files/MAX-FILES

First of all, the MAX-FILES configuration switch basically applies to good old MSDOS, thus, if you would like to increase it, feel free to do so.

On the other hand, it is never a good idea to increase something just for the purpose of doing it, it is always a reason something is not set high in the first place.

As for your recursive issue. A very simple approach is just add another numeric parameter and increment that one for each pass.
You may also declare a global variable using the EXTERNAL clause (see documentation "IS External clause" book 3). Then using this as a controller rather than an additional parameter.

Note however, if you are programming with threads, you should use an additional parameter rather than the EXTERNAL clause.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Number of open files/MAX-FILES

I was unaware the MAX-FILES could go larger than 255 on other systems, the doc notes 255 on unix. When I found that out I was cautioned by support that at this time values above 255 would be unpredictable and they strongly cautioned me against using it. Sounds like there might be some changes in this area in the next version.

I had considered using a global variable as a counter. The probem that I run into with that is there are probably 10 programs involved, each with varying numbers of files in use and to limit them just on a recursion count (low enough to stop file errors) in some cases it would cause the program to stop at such a low level the level of data updating would be very adversely affected. Good thought though, and probably by far the simplest.
Brad
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.