Because Vision Versions 4, 5, or 6 generate files in a dual file format, a COBOL application registers at least two open files
for each Vision file. (Version 2 and 3 use a single file format.) For large files with data extensions, the number of open
files per Vision file (versions 4 and 5) can be greater than two. Various techniques exist for controlling the number of files
that can be open at one time.
- The COBOL configuration variable
MAX_FILES sets the maximum number of files that can be opened by the runtime system. The default value is
32. You can set this to any value up to
32767. Keeping this value small conserves memory.
- Many operating systems limit the number of files that can be opened by a single process, so you may need to make some adjustments.
On UNIX systems, file limits are controlled by kernel parameters. On VMS, file limits are controlled by process parameters.
- If you are using an external file system or database instead of (or in conjunction with) Vision, limits may be imposed by
the external file system or by the interface. See the ACUCOBOL-GT document for the specific interface that you are using.