8 File Storage

Storaging and Retrieving Data

In addition to storing program lines, files are used to store collections of data that are too large to be contained conveniently in DATA statements in your program. These files have the extension .DATA and throughout this manual are referred to as data files. Data files are often accessed by more than one program.

The use of data files involves these six operations which are explained in detail later in this section:

  1. A data file must be CREATEd by specifying the file name and size. You may also specify on what volume the data file should be created.

  2. A data file must be opened using the ASSIGN statement. This gives your program access to the data file and assigns a number to that data file. The file number is then used throughout a program to refer to that particular data file.

  3. Data is put into the file via the PRINT statement.

  4. Data is copied from the file into assigned storage areas in a program (variables or arrays) via the READ statement.

  5. Closing a data file indicates that your program has finished using that file. The data remains in the file for future use.

  6. You can PURGE a data file when the data in that file is no longer required.


Eloquence Language Manual - 19 DEC 2002