Opcode Meaning 00 OPEN ol CLOSE 02 READ 03 WRITE 04 RESTORE /REWIND 05 LOAD 06 SAVE 07 DELETE 08 SCRATCH RECORD 09 STATUS Figure C.3.2.1 1/0 Opcodes C.3.2.1 OPEN The OPEN operation should be performed before any data transfer operation except LOAD ur SAVE. The File remains vpen until a CLOSE uperation 1s performed. The mode of operation for which the file has to be opened should be indicated in the flagbyte of the PAB. In case this mode is UPDATE, APPEND, or INPUT, the record length will be returned in byte four. Any given non-zero record length will be checked against this stored length. For OUTPUT the record length can be specified, or a default can be used by specifying record length zero. - For any device, an OPEN operation must be performed before any other 1/0 operation. The DSR need only check the record length and I/O mode on an OPEN. Changing 1/0 modes after an UPLN may cause unpredictable results. C.3.2.2 CLOSE The CLOSE operation informs the DSR that the current I/0 sequence to that OSR has been completed. After the CLOSE operation, the space allocated for the PAB may be used for other purposes. As long as a PAB is connected to an active device, the contents of that PAB must be preserved. If file or device is opened for OUTPUT or APPEND mode, an EOF (end of file) record is written to the device or file before disconnecting the PAB. €.3.2.3 READ The READ operation reads a record from the selected device and copies the bytes in the specified buffer. The buffer address is specified in PAB entry 2 and 3; the buffer size is specified in PAB entry 4. The actual number of characters stored is returned in PAB entry 5 (CHARACTER COUNT). If the length of the input record exceeds the buffer size, the remaining characters will be discarded. Pe :