Regularize I/O Keywords Technical Specification and Syntax To: J3 From: Craig T. Dedo Date: October 26, 2000 Subject: Regularize I/O Keywords - Technical Specification and Syntax 1. Rationale Users often would like to have complete regularity between the keywords for the OPEN statement and the keywords that are allowed for the READ and WRITE statements. In addition, this is an integration issue that arises out of the user-defined derived-type input/output (DTIO) feature. If J3 approves regularizing input/output (I/O) keywords, it will be much easier to make sure that DTIO is correctly designed and the normative text correctly written. 2. Technical Specification and Syntax This paper creates the concept of properties (or modes) for I/O connections. Due to some disagreement about what is proper terminology, there is a straw vote on the proper term to use for this concept in part 3. The state of a connection property may be explicitly specified by a keyword specifier or implicitly specified if the corresponding keyword is absent. This feature allows a user to specify the values for the following connection properties in the OPEN statement or in READ and WRITE statements. 1. Blank interpretation 2. Character string delimiter 3. Padding of input records 4. Sign presence or absence The states of I/O connection properties are determined according to the following hierarchical rules of precedence. 1. The initial state for a connection property is established by the most recently executed OPEN statement on that unit. The connection properties for an internal file or pre-connected file have the same initial states that would be established if an OPEN statement was executed and the corresponding keyword was absent. 2. The state of a connection property established by an OPEN statement may be temporarily changed by a corresponding keyword in a data transfer statement, during the execution of that data transfer statement. 3. The state of a connection property established by an OPEN statement or a data transfer statement may be temporarily changed by a format edit descriptor. The connection properties in effect immediately before a data transfer statement is executed are restored when the data transfer statement terminates. A child data transfer statement in a DTIO statement [ shall | shall not ] inherit the states of the connection properties in effect in the parent data transfer statement. (See straw vote.) Users shall be able to use the BLANK=, DELIM=, and PAD= keywords in READ and WRITE statements. The BLANK=, DELIM=, and PAD= keywords shall have the same values in READ and WRITE statements that they have in the OPEN statement. Users shall be able to use a SIGN= keyword in the OPEN, READ, WRITE, and INQUIRE statements. When used in an OPEN, READ, or WRITE statement, the SIGN= keyword shall set or change the sign connection property. It shall evaluate to one of the values of PLUS, SUPPRESS, or PROCESSOR_DEFINED. The SIGN= keyword values shall correspond to the sign edit descriptors SP, SS, and S respectively. When used in an INQUIRE statement, the SIGN= keyword shall assign the value of the current sign connection property to the scalar default character variable that is associated with the SIGN= keyword. 3. Straw Votes 1. Which term do you prefer for referring to the various aspects for input/output connections? Mode Property Something else Undecided 2. What should be the inheritance rule for input/output connection properties between parent and child data transfer statements in DTIO statements? Always inherit Never inherit User-controlled Processor-dependent Undecided [End of J3 / 00-316]