J3/14-123r2 To: J3 From: Van Snyder Subject: OPEN statement and changeable modes Date: 2014 February 13 1. Introduction =============== 9.5.6.1p6 [14-007:208:32-33] says "The ERR=, IOSTAT=, and IOMSG= specifiers from an OPEN statement have no effect on any subsequent OPEN statement." There is nothing similar for any other statement. This is apparently because the first sentence of 9.5.6.1p6 says "only the specifiers for changeable modes (9.5.2) may have values different from those of the existing connection." It's not obvious this is needed, since ERR= etc. do not specify values for a connection. If it's needed, the existing sentence is an inscrutably opaque way to address this. Should we (a) delete it, (b) add ERR= etc. to the list of specifiers that can have "different values" (whatever that means), (c) replace it with a note to the effect that ERR= etc. do not specify "values for a connection", (d) clarify in 9.5.2 what "connection modes" are, or (e) do something else? 2. UTI ====== /JATA subgroup pondered other alternatives and realized that there are deeper problems. Therefore, subgroup recommends a UTI: [14-007:207:5] UTIxxx There are problems with connection modes. 9.5.2p1 specifies the changeable modes and then does some vague handwaving about connection modes, without saying what the connection modes other than the changeable ones are (e.g., RECL=). 9.5.6.1p6 says that the only specifiers that can have different values when an OPEN statement is executed for a connected unit, and the FILE= specifier specifies the file to which it is connected, are the ones for changeable modes. Then the final sentence of 9.5.6.1p6 says "The ERR=, IOSTAT=, and IOMSG= specifiers from an OPEN statement have no effect on any subsequent OPEN statement." This is apparently because the first sentence of 9.5.6.1p6 says "only the specifiers for changeable modes (9.5.2) may have values different from those of the existing connection." The final sentence of 9.6.5.1p6 begged for clarification, but there are at least three ways and places to improve it. One is to replace it with a note "The ERR=, IOSTAT= and IOMSG= specifiers do not specify values for a connection, and therefore may be different from any that appeared in a prior OPEN statement for the same connection." One is to change the first sentence of 9.5.6.1p6 to specify explicitly that all specifiers other than ERR=, IOSTAT=, IOMSG=, and ones for changeable modes, shall have the same values as in the OPEN statement that initially connected the unit to the file. A third is to specify in 9.5.2 what are non-changeable connection modes, and exploit that distinction in 9.5.6.1p6. This leaves one more problem: If a file is opened with a POSITION = 'rewind' specifier, then some records are transferred, then an OPEN statement is executed to change a changeable mode, with the POSITION = specifier appearing again, necessarily with the value 'rewind', not 'asis', is the file rewound?