0721

From BR Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Summary:

Attempted I/O conflict with Open

Cause:

An I/O conflicts with corresponding open statement. Some possibilities:

  1. Read
    1. Attempt to read a file that is opened for Output.
    2. Attempt to read Rec= or Key= to a file opened sequential.
    3. Attempt to use read on a display file
  2. Open
    1. Attempt to create a new file when open is for Input only
    2. ,Use specified on a Input only open statement.
  3. Version
    1. Attempt to access version number on file that is not internal or a key file that is opened as internal
    2. Attempt to reset version number on file that is not opened OutIn
  4. Write/Rewrite/Print
    1. Attempt to ReWrite a record in file that was opened for Output
    2. Attempt to Write #0
    3. Attempt to write to a display file

Remedy:

Change the I/O statement so that it matches the way the file was opened. For the situations noted above:

  1. Read
    1. Read may be executed only on files opened for Input or OutIn.
    2. Read Rec= or Key= may be executed only on files opened relative.
    3. Use Input or LInput to read display files.
  2. Open
    1. If a new file is to be created, OPEN must be for Output or OutIn.
    2. Remove the ,Use from the syntax.
  3. Version
    1. Version may be executed on non-keyed files opened internal only.
    2. If version number is to be reset, file must be opened OutIn
  4. Write/Rewrite
    1. Change Output on the Open Statement to OutIn
    2. Change the invalid file handle to a valid one
    3. Change the write to a print