File I/O - OPEN
$ OPEN logical_name filespec
Notes:
The OPEN statement establishes a “channel identifier” which you can use in READ and WRITE statements as well as in the CLOSE statement to finish using the file.
/READ opens the file for reading. The file must exist.
/WRITE opens the file for writing. If not accompanied by /READ, a new file is created.
/SHARE specifies how other I/O streams may use the file.
/ERROR is used to specify a label where control should be transferred when an error occurs.