J3/14-135r2 To: J3 Subject: Poor exposition for OPEN statement modifying current connection From: Van Snyder Date: 2014 May 29 Reference: 14-123r2 1. Introduction =============== Subclause 9.5.6.1p6 says "If the file to be connected to the unit is the same as the file to which the file is connected, only the changeable modes (9.5.2) may have values different from those of the existing connection." It's not clear what a "value of the existing connection" is. That paragraph continues to give explicit specification for the POSITION= and STATUS= specifiers, so either they don't specify "values for the connection" or there's a contradiction. At the end, it says "The ERR=, IOSTAT=, and IOMSG= specifiers from an OPEN statement have no effect on any subsequent OPEN statement." This appears nowhere else. One might interpret it as yet another exception to the first sentence, or to mean that if these specifiers do not appear the ones from the OPEN statement that established the connection, or from an earlier OPEN statement that modified the connection, are not used. If the latter, in light of the words "during execution of an input/output statement that contains neither the ERR= nor IOSTAT= specifiers" in 9.11.2p2, it does not appear to be necessary. The exposition in 9.11.6 could be improved to make this clear in the IOMSG= case. It would be better simply to list the specifiers that are not allowed to specify different values from the ones specified when the current connection was initially established. Paper 14-123r2 urged the editor to insert a UTI, but the editor does not agree that it is a technical issue. 2. Edits to 14-007r1 ==================== [206:27-35 9.5.6.1p6] Replace the paragraph: "If the file to be connected to the unit is the same as the file to which the unit is connected, a new connection is not established, but specifiers for changeable modes (9.5.2) may specify values different from values current for the connection. This causes new values for the specified modes to be in effect, but does not change any value for any modes for which such specifiers do not appear. Before any effect on changeable modes, a wait operation is performed for any pending asynchronous operations for the specified unit. The position of the file is not changed; if the POSITION= specifier appears, the value specified shall not be different from the current position of the file. If any of the specifiers ACCESS=, ACTION=, ASYNCHRONOUS=, ENCODING=, FORM=, or RECL= appear, they shall specify the same values as for the OPEN statement that established the current connection, or default values if they did not appear in the OPEN statement that established the current connection. If the STATUS= specifier appears, it shall be specified with the value OLD." It does not appear to be necessary to include "The NEWUNIT= specifier shall not appear," because that would result in a new connection, with the same file being connected to two units; this is prohibited by 9.5.4p4. [242:26 9.11.6p1] After "statement" insert "in which an IOMSG= specifier appears" (or "containing the IOMSG= specifier" for consistency with [242:13 9.11.5p1]) to make it clear that one in a different statement, in particular a prior OPEN statement for the same connection, does not apply.