The OPEN statement referred to a unit that was already connected to a file. Because the FILE specifier was either omitted or had a value that was same as the name of the file to which the unit was already connected, the OPEN statement did not cause the file to be disconnected and opened again; instead, the OPEN statement applied to the already existing connection. In addition, the POSITION specifier on the OPEN statement had a value of either REWIND or APPEND. This is not allowed because only the BLANK, CHAR, DELIM, and PAD specifiers can change the properties of the connection when the OPEN statement refers to an existing connection between a unit and a file.
If the unit is other than the error message unit, the unit is no longer connected to a file. 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, statement has a value of READ, and parm_count has a value of 4.
Permissible Resume Actions:
Name | Action Taken after Resumption |
---|---|
RN | The OPEN statement is not completed, and execution continues. |
Ensure that both the OPEN statement and any previously executed I/O statements refer to the unit number that you intend.
If you want to retain the existing connection between the unit and the file, then either remove the POSITION specifier from the OPEN statement or change the value of the POSITION specifier to ASIS.
For either of these two cases, all specifiers coded on the OPEN statement and the default values for all omitted specifiers provide the properties of the new connection between the unit and the file.
FOR1439