Example of Open statement:
The OPEN INPUT TRANSACTION, OLD-MASTER OUTPUT NEW-MASTER.
The illustration represents that there are two input files named the TRANSACTION and OLD-MASTER and one output file known as the NEW-MASTER. All these files are opened and these are prepared for reading or writing.
OPEN INPUT MARK-FILE.
OPEN OUTPUT RESULT-FILE.
The first OPEN statement opens the MARK-FILE in the input mode and the file is ready for the reading. The later statement makes the RESULT-FILE ready for the writing. There may be numerous OPEN statements in a program.