J3/14-135r5 To: J3 Subject: Poor exposition for OPEN statement modifying current connection From: Van Snyder and Steve Lionel Date: 2014 June 26 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 unit 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. Specification: Clarify the explanation for OPEN on a connected unit Syntax: None. Edits to 14-007r1 [206:27-28] Replace the sentence: "If the file to be connected to the unit is the same as the file to which the unit is connected, only the specifiers for changeable modes (9.5.2) may have values different from those of the existing connection." with: "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 and values for any changeable modes (9.5.2) specified come into effect for the established connection; the current file position is unaffected." [206:32-35] Replace the sentences: "Execution of such an OPEN statement causes any new values of the specifiers for changeable modes to be in effect, but does not cause any change in any of the unspecified specifiers and the position of the file is unaffected. The ERR=, IOSTAT=, and IOMSG= specifiers from an OPEN statement have no effect on any subsequent OPEN statement." with: "Other than ERR=, IOSTAT=, IOMSG=, and the changeable modes, the values of all other specifiers in such an OPEN statement shall not differ from those in effect for the established connection." The whole paragraph now reads: "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 and values for any changeable modes (9.5.2) specified come into effect for the established connection; the current file position is unaffected. Before any effect on changeable modes, a wait operation is performed for any pending asynchronous data transfer operations for the specified unit. If the POSITION= specifier appears in such an OPEN statement, the value specified shall not disagree with the current position of the file. If the STATUS= specifier is included in such an OPEN statement, it shall be specified with the value OLD. Other than ERR=, IOSTAT= and IOMSG=, and the changeable modes, the values of all other specifiers in such an OPEN statement shall not differ from those in effect for the established connection."