To: J3 J3/20-155r1 From: Richard Bleikamp Subject: UTI-008 Date: 2020-October-14 Reference: 20-134 Per the straw vote, the r1 paper fixes a few things, see below. 12 -Allow optional w width (what this paper does) 0 - leave 20-007 as is, "w" is required 7 - do not allow boz-literal-constants as output items 3 - undecided If this paper doesn't pass, I will write up option 3 for the next meeting (do not allow boz-literal-constants as output items). CHANGES in this r1 are: - "descritor" -> "descriptor" - changed "the trailing zero bit" to "a single zero bit" twice - "specifer" -> "specifier" twice - Rewrote the last edit, for list directed I/O of boz constants * previous edits didn't really say we produced Z"value" for a hex box constant, new edits clarify this. Always use apostrophes, upper case B,O, or Z. Unresolved techical issue 008 covers two problems with output of BOZ constants. 1) output of a value too large for the specified field width is currently very different than other output editing, instead of producing "*"s, the value is truncated. 2) the case when the specified field width is zero (Z0) is well defined, but perhaps not appropriate/useful for this data type. The form "Z8.8" could be used to get the desired effect, but requires the user to count the number of bits in the constant, and do the math to know how wide the field should be for the chosen edit descriptor. Proposed solution: 1) print "*"s when the value to be printed has non-zero characters truncated so it fits in the specified field width. 2) allow the field width "w" to be omitted, for output of boz-literal-constants only. When "w" is absent, the processor chooses a field width that avoids truncating any leading zero bits, similar to how the "A" edit descriptor picks the minimal size field width to print the whole character string, including trailing blanks. List directed will act like this. w=0 still acts more like I0, just using hex/octal/binary, leading zero bits are truncated, but one zero bit is retained when the boz-literal-constant is entirely zero bits. (avoid printing "", instead of "0", when w is zero and the list item item is only zero bits. Intended effect: 1) users that think BOZ constants are just integers, can use Zn. Z0 will pick a minimal field width (trim leading zero bits), and Zw.n will act like the I edit descriptor, more or less. Zw.m, when w equals m, and w/m are the correct value for the size of the BOZ constant, will act like the new proposed option, "Z" without a field width. 2) users that think BOZ constants are just a string of bits, and zeros are just as interesting as ones, can use "Z" without a field width, and get all the bits, zeros and ones, represented in the output. They can also use "Zw.m" where w equals m, and w/m are the smallest value that lets the entire BOZ constant, including leading zeros, be represented in the output. Note that UTI 009 addresses the issue with BOZ constants not being permitted as list items. EDITS: to 20-007 [265:24] and [266:1] and [266:2] replace "w [ . m ]" with "[ w [ . m ]]" [266:19] delete "B, O, Z, " (no constraint checking) [270:4] delete the sentence "The B, ... boz-literal-constants." [270:27-32] delete all of list item (8), and renumber the rest [270:32+] Delete Unresolved Technical Issue 008 [276:28] (section header 13.7.2.4) add "numeric " before "editing" [277:11] replace "bits." with "bits, except a single zero bit is retained if the internal value consists of all zero bits." [277:18+] Start a new section, 13.7.3, renumbering as needed. Insert "13.7.3 B, O, and Z editing for boz-literal-constant list items A boz-literal-constant list item that is edited with a B, Bw, Bw.m, O, Ow, Ow.m, Z, Zw, or Zw.m edit descriptor, is edited using these rules. (1) The field width specifier w may be omitted, or specified with a value greater than or equal to zero. (2) When a value greater than zero is specified for the field width specifier w, that value is used for the actual field width, and if the length of the boz-literal-constant with leading zero bits removed cannot be accurately represented in that field width, the processor shall fill the entire field of width w with asterisks. (3) When a value of zero is specified for the field width specifier w, the processor selects the smallest positive actual field width that can accurately represent the boz-literal-constant with leading zero bits removed, except a single zero bit is retained if the internal value consists of all zero bits. (4) When the field width specifier w is omitted, the processor chooses the smallest positive actual field width that can represent the entire boz-literal-constant, including all leading zero bits. (5) The expected length of the bit sequence is the actual field width, times three for an O edit descriptor and times four for a Z edit descriptor. If the bit sequence in the boz-literal-constant has a length that is less than the expected length, it is treated as if it were extended to the expected length by padding on the left with zero bits." (6) Output editing is performed described in 13.7.2.4, except leading zero bits are kept when the field width specifier w is not present." [287:10+] add this new paragraph (this is in the list directed I/O section) "boz-literal-constant output values are in the form of a boz-literal-constant, beginning with the character B, O, or Z, corresponding with the form of the output list item, immediately followed by the value enclosed in apostrophes. The value is produced with the effect of one of the following edit descriptors without the optional field width specifier w: a B edit descriptor when the list item is a binary-constant, an O edit descriptor when the list item is an octal-constant, and a Z edit descriptor when the list item is a hex-constant."