FOR1439S
The OPEN statement for unit unit-number, which was already connected to file file-name, failed. The POSITION specifier had a value of position, which was other than ASIS.

Explanation

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.

System action

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.

Programmer response

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.

If you want to use the OPEN statement to establish a new connection between the unit and the file, then take one of the following actions to disconnect the unit from the file to which it's already connected and to connect the unit to a different file:
  • Execute a CLOSE statement followed by another OPEN statement.
  • For a named file only, execute an OPEN statement with a FILE specifier whose value is different from the name of the file to which the unit is already connected. This has the effect of executing a CLOSE statement with no STATUS specifier followed by the OPEN statement.

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.

Symbolic Feedback Code

FOR1439