To: J3 Members J3/16-120r3 From: Van Snyder & Steve Lionel Subject: Several units for one file, nonadvancing, asynchronous, etc. Reference: 15-226, 14-174r1 (UK-12), 16-007 Date: 2016 February 11 1. Introduction =============== [211:24-25 9.5.4p4 and 212:31 9.5.6.1p8 in 15-007r2] 9.5.4p4 says it is processor dependent whether a file can be connected to more than one unit at the same time. 9.5.6.1p8 prevents it. Which one is it? Since the permission was added by work item UK-12 (14-174r1) we can presume it is intended to be allowed. Once you open a can of worms, you need a bigger can to put them back. Connecting several units to a file is not mentioned in the introduction. If a file is connected to more than one unit, how do asynchronous output and nonadvancing output work? Are their behaviors processor dependent, or should these actions be prohibited? /JOR's position is that wording is needed to say that any I/O where multiple units are connected to the same external file is processor dependent. 8.1.6.5p5 says that if records are written to a file connected for sequential access during more than one iteration of a DO CONCURRENT construct, the ordering between records is processor dependent. This is posed by reference to a file, not a unit, so if a file is connected to more than one unit, there is no new problem. The subclause is silent concerning the relationship between DO CONCURRENT and asynchronous output. Asynchronous is probably OK because 9.6.2.5p3 says asynchronous transfers are "read, written, and processed as they would have been if the data transfers were synchronous. /JOR's position is that no edits are needed here. The description of the NUMBER= specifier says it assigns the unit number of the connected file. It doesn't say which unit number is assigned if more than one is connected. The simplest answer is that it is processor dependent. A complicated additional feature is to allow (but not require) a rank-one allocatable array, which is thereby allocated with a size equal to the number of units attached to the file (zero if there are none), and each element is assigned the external unit number for one of those units. /JOR prefers saying that the number returned in such cases is processor- dependent. The alternative would be a new feature and out-of-scope. 2. Edits ======== [211:35+ 9.5.4p5+] Insert a paragraph: "If input/output operations are performed on more than one unit while they are connected to the same external file, the results are processor dependent." [212:31 9.5.6.1p8] Delete the paragraph that begins "If a file is already connected...." {Restriction is no longer valid - case covered by 9.5.4} [243:14 9.10.2.18p1] Insert a sentence before the one that begins "If there is no unit...": "If more than one unit on an image is connected to the file, which of the connected external unit numbers is assigned to the is processor dependent." [509:8+] Insert a list item: "o the effect of performing input/output operations on multiple units while they are connected to the same external file (9.5.4);" [510:10+] Insert a list item: " o which of the connected external unit numbers is assigned to the in the NUMBER= specifier in an INQUIRE by file statement if more than one unit on an image is connected to the file (9.10.2.18);"