To: J3 J3/21-201 From: Rich Bleikamp & JOR Subject: connection modes and child data transfer statements Date: 2021-October-24 Reference: 21-177, 21-197 See 21-177 and 21-197 for a discussion of changable modes for a connection to an internal or external file. Most of JOR believes these edits just clarify the existing 007 text, but notes that two former/current J3 members were unclear what the standard said, or what was originally intended. Also note that one compiler we tested did the "right" thing, while 3 other compilers did NOT pass the values for changable modes from a parent data transfer statement into a child data transfer statement nor back to the parent when the child terminates. Hence our attempt to clarify the original intent. Intended behavior: - a child data transfer statement uses the same connection as the parent data transfer statement. For external units, this was easily inferred because the unit #s for both have the same value. For internal units, one could assume it was the same connection because the same internal record/file was being written to by both the parent and the child data transfer statements. - When a child data transfer statement begins executing, the connection modes have values inherited from the parent data transfer statement, at the point the DT edit descriptor caused the active defined input/output procedure to be invoked. The standard defines when the mode values are changes and reset. No clarification is needed for this behavior. - When a child data transfer statement terminates, the values of the connection modes are reset to those values in effect just before that child data transfer statement started (see last paragraph of 12.5.2). A few words to clarify this are added to 12.5.2. The edits below just clarify all this. [231:8-9], last paragraph of 12.5.2] replace "When a data transfer statement terminates, the values for the modes are reset" with "When a parent or child data transfer statement terminates, the values for the modes are reset" [251:35] after "is called a child data transfer statement." add the sentence "A child data transfer statement and it's corresponding parent data transfer statement use the same file connection (12.5), whether or not the parent and child data transfer statements specify the same *io-unit*."