# CLOSE

Syntax:

Then: close
Then: close filename

Use CLOSE by itself to close all files except the current file.

Use CLOSE filename to close an individual file, where "filename" is a lookup file name, or an export file name. CLOSE can be used on all processing tables.

Version Ref: 3.x (not included in filePro Lite)

Description:

Use CLOSE when doing lookups to avoid exceeding your operating system's open-file limitations.

NOTES: Different operating systems have varying abilities with regard to how many files can be opened at one time by one user. If you reach this limit (older XENIX systems, MS-DOS are usually 20 files open per user, with 3 files being reserved for use by the o/s itself; Unix systems usually are set to 60 to 100+ files open simultaneously by one user), then you may have to CLOSE some files that filePro does not need at a particular moment to accomplish the task at hand. When done, other files can be closed and previous ones opened again. In general, however, filePro will automatically handle the closing and opening of files for you.

Every individual file is counted toward the operating system limits. That is, in filePro's case, the "map", the "indexes", the "key" and "data" files (if there is anything in the data file which is usually not used any more), among others. These can mount up very quickly if you are doing a lot of lookups to files with lots of indexes. Still, the maximum number of open files is a hard limit to reach these days. You will more than likely not need these CLOSE functions.

Technical Notes:

Open files will include a minimum of three files used by the operating system for screen and keyboard operation.

Restrictions:

Remember that you cannot access fields from a file once it's closed.