Regularize I/O Keywords To: J3 From: JOR Date: June 1, 2000 Subject: Regularize I/O Keywords 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. JOR considered this need and proposes to allow the BLANK=, DELIM=, and PAD= keywords in READ and WRITE statements. Edits Edits are with respect to the 00-007r1. [171:18+] Add the following paragraph immediately before 9.4.1: A file has various modes associated with it. A value for a mode is established by an OPEN statement. The value may be explicitly specified by a keyword specifier, or implicitly specified if the corresponding keyword specifier is absent. The modes for an internal file or preconnected file are initially the same values implicitly specified as if an OPEN statement without the corresponding keywords had been executed. Some modes may be temporarily changed by a corresponding keyword specifier in a data transfer statement, or by an edit descriptor. When a parent data transfer statement terminates, the values of these modes are reset to the values in effect immediately before the parent data transfer statement was executed. J3 Internal Note Is "parent data transfer" the correct term? Do we need to be concerned with child data transfer statements? We need to be sure that all data transfer statements reset the modes properly when they terminate. [175:38} Add the following sentence immediately after the first sentence. The DELIM= specifier sets the initial value of the delimiter mode (10.9.2, 10.10.2.1) for all formatted data transfer for this connection. [175:38-44] Delete the sentences, "If APOSTROPHE is specified . . . marks be doubled." [176:2] Add the following sentence immediately after the first sentence. The PAD= specifier sets the initial value of the pad mode (9.5.4.4.2) for all formatted data transfer for this connection. [176:2-5] Delete the sentences, "If YES . . . record contains." [178:34+] Add the following to the list: or BLANK = scalar-default-char-expr or DELIM = scalar-default-char-expr or PAD = scalar-default-char-expr [178:37+] Add "Constraint: A DELIM= specifier shall not appear in a read-stmt.". [178:38] Add "BLANK=, PAD=," to the constraint before "END=". [179:25+] Add "Constraint: If a DELIM= specifier is present, either format shall be an asterisk or namelist-group-name shall appear. [182:20+] Add the following sub-sections to section 9.5.1: 9.5.1.11 BLANK= specifier in a data transfer statement The scalar-default-char-expr shall evaluate to NULL or ZERO. The BLANK= specifier is permitted only for a file that is connected for formatted input. It specifies the initial value of the blank interpretation mode (10.7.6) for a formatted input statement. If no BLANK= specifier appears in the io-control-spec-list, the initial blank interpretation mode is that established by the OPEN statement (9.4.4, 9.4.4.6); an internal file or a preconnected file that has not been opened is treated as if the file had been opened with no BLANK= specifier (9.4.4.6). 9.5.1.12 DELIM= specifier in a data transfer statement The scalar-default-char-expr shall evaluate to APOSTROPHE, QUOTE, or NONE. It specifies the initial value of the delimiter mode (9.4.4.9) for a formatted output statement. If no DELIM= specifier appears in the io-control- spec-list, the initial delimiter mode is that established by the OPEN statement (9.4.4, 9.4.4.9); an internal file or a preconnected file that has not been opened is treated as if the file had been opened with no DELIM= specifier (9.4.4.9). This specifier is permitted only for formatted output. 9.5.1.13 PAD= specifier in a data transfer statement The scalar-default-char-expr shall evaluate to YES or NO. It specifies the initial value of the pad mode (9.4.4.10) for a formatted input statement. If no PAD= specifier appears in the io-control-spec-list, the initial pad mode is that established by the OPEN statement (9.4.4, 9.4.4.10); an internal file or a preconnected file that has not been opened is treated as if the file had been opened with no PAD= specifier (9.4.4.10). This specifier is permitted only for formatted input. J3 Internal Note The default mode values are not well defined for internal files (9.3) and pre-connected units(9.4.3) in the descriptions for the OPEN statement. [185:6} Change "PAD= specifier" to "pad mode". [189:4,6,9,12] Change "from a file whose PAD= specifier" to "when the pad mode" four times. [202:2-4] Replace the first sentence of the paragraph with the following sentence. The scalar-default-char-variable in the BLANK= specifier is assigned the value ZERO or NULL corresponding to the blank interpretation mode in effect for a file connected for formatted input/output. [202:38-41] Replace the first three sentences of the paragraph with the following sentence. The scalar-default-char-variable in the DELIM= specifier is assigned the value APOSTROPHE, QUOTE, or NONE corresponding to the delimiter mode in effect for a file connected for formatted input/output. [203:2-4] Replace both sentences of the paragraph with the following sentence. The scalar-default-char-variable in the PAD= specifier is assigned the value YES or NO corresponding to the pad mode in effect. [205:41] Change "PAD= specifier" to "pad mode". [214:9-11] Replace "a combination of any BLANK= specifier . . . (10.7.6)" with "the blank interpretation mode". [224:7-11] Replace the sentence beginning with, "At the beginning . . ." with "At the beginning of formatted input nonleading blank characters are interpreted as zeros if the blank interpretation mode has the value ZERO or are ignored if the blank interpretation mode has the value NULL (9.4.4.6, 9.5.1.11)." [224:17] Add the following sentence at the end of the paragraph: The BN edit descriptor sets the blank interpretation mode to NULL; the BZ edit descriptor sets the blank interpretation mode to ZERO. [229:20-21] Change the text to read, "Character sequences produced when the delimiter mode has a value of NONE". [229:29] Change the text to read, "Character sequences produced when the delimiter mode has a value of QUOTE". [229:32] Change the text to read, "Character sequences produced when the delimiter mode has a value of". [234:14-15] Change the text to read, "Character sequences produced when the delimiter mode has a value of NONE". [234:26] Change the text to read, "Character sequences produced when the delimiter mode has a value of QUOTE". [234:29] Change the text to read, "Character sequences produced when the delimiter mode has a value of". [End of J3 / 00-223]