This data cannot be used with other programs and it would be very difficult, if not impossible, to update. To eliminate these restrictions, data can be stored on auxiliary storage media such as magnetic disk or tape. Data stored in this manner is called a data file. A file consists of a group of related records and each record consists of fields. A field is a specified area in a record used for a particular category of data.
Most computers require a file processing statement to make a file ready to be read or written.
This is usually some type of open statement and includes the file name and the tape or disk where the data will be written or read. Once the file is opened, file processing statements are used to read data from a storage medium into memory or to write data from memory to a storage medium. Once you are through processing a data file, you must tell the computer you are finished with that file. This is done with some type of close statement. Storing data independently from programs allows more flexibility.