Your program has already processed 999 subfiles and is trying to position itself into the next one; however, 999 is the maximum number of subfiles that can be handled. Note that each subsequent subfile is referenced when you execute a READ, WRITE, or ENDFILE statement either after the end-of-file condition was just detected for a READ statement or after you just executed an ENDFILE statement.
The file is closed. 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, and parm_count has a value of 4.
Name | Action Taken after Resumption |
---|---|
RN | The remainder of the input item list is ignored, and execution continues. |
Ensure that your program doesn't inadvertently execute a READ, WRITE, or ENDFILE statement for the same unit either after reaching the end of the file or after executing an ENDFILE statement. Use the END specifier, if necessary, on the READ statement 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
FOR1028