FOR1022S
The statement statement for unit unit-number, which was connected to file-name, failed. The file was already positioned after the endfile record. VS FORTRAN Version 2 Error Number: AFB101I, AFB218I (format 8)

Explanation

The file was positioned after the endfile record either because the end-of-file condition was just detected for a READ statement or because you just executed an ENDFILE statement. Your statement statement implied the use of a subsequent subfile, but your file did not have multiple subfiles because it was a dynamically allocated scratch file, a named file, or a striped file.

System action

If neither the ERR nor the IOSTAT specifier is present on the I/O statement, the condition is signaled. If the condition is unhandled, the application is terminated.

Qualifying Data: Only the basic set of four qualifying data for I/O conditions as shown in Table 1. Within this basic set, parm_count has a value of 4.

Name Action Taken after Resumption
RN The I/O operation is ignored, and execution continues.

Programmer response

Do not try to read or write records beyond the endfile record for the files that don't support multiple subfiles. The only files that can have multiple subfiles are unnamed files that are neither striped files nor dynamically allocated.

Check the logic of your program to ensure that you haven't inadvertently executed a READ or WRITE statement either after reaching the end of the file or after executing an ENDFILE statement. Use the END specifier, if necessary, to detect the end of the file.

If you want to extend an existing file after reading through the data records and detecting the end of the file, you can do so by executing a BACKSPACE statement (which positions the file just beyond the last data record and just before the endfile record) followed by WRITE statements.

Symbolic Feedback Code

FOR1022