Open: Dataset is connected/readied to your program using OPEN statement. The mode of OPEN decides the operation allowed and the initial pointer in the dataset.
OPEN STATEMENT: Syntax: OPEN OPENMODE FILENAME
OPENMODE can be INPUT OUTPUT I-O EXTEND INPUT - File can be used ONLY-FOR-READ purpose. OUTPUT - File can be used ONLY-FOR-WRITE purpose. I-O - File can be used FOR READ, WRITE and REWRITE purpose. EXTEND - File can be used FOR appending records using WRITE.