<br><font size=2 face="sans-serif">Here's the revised decimal supplement
again for final approval. Please can we discuss on the call today for inclusion
in draft 33.</font>
<br>
<br><font size=2 face="sans-serif">This has been updated to reflect the
debate below around properties dfdl:decimalFormat and dfdl:integerFormat
(because either could be used with xs:int and xs:decimal, and at
runtime the parser does not know which one to apply). So dfdl:decimalFormat
has been removed, and replaced by dfdl:numberFormat - defined below. </font>
<br>
<table border>
<tr valign=top>
<td><font size=1 face="Arial"><i>Property Name</i></font>
<td><font size=1 face="Arial"><i>Description</i></font>
<tr valign=top>
<td><font size=1 face="Arial">numberFormat</font>
<td><font size=1 face="Arial">String</font>
<p><font size=1 face="Arial">Valid values are ‘text’, ‘zoned’, ‘packed’,
‘BCD’, 'twosComplement'</font>
<p><font size=1 face="Arial">When the representation is ‘text’ then the
allowable values are ‘text’ and ‘zoned’.</font>
<p><font size=1 face="Arial">When the representation is ‘binary’ then
the allowable values are ‘packed’, ‘BCD’ and 'twosComplement'.</font></table>
<br>
<br><font size=2 face="Arial">I'd also like to propose that we rename dfdl:defineNumberFormat
to dfdl:defineTextNumberFormat, to prevent confusion.</font>
<br>
<br><font size=2 face="sans-serif">The other change is around the </font><font size=2 face="Arial">packed
decimal convention, sometimes used, that zero is indicated by all bytes
being hex zero, even though this is not technically a valid packed decimal
number. I had said that on parsing, whether to tolerate this is governed
by the numberCheckPolicy property, and on unparsing, this convention is
not used. That won't work because we are talking about (binary) packed
decimals and numberCheckPolicy is a property within (text) dfdl:defineNumberFormat.
One solution is to move numberCheckPolicy outside of dfdl:defineNumberFormat
and have it apply to both text and binary numbers. </font>
<br>
<br><font size=2 face="Arial">However it can be observed that numberCheckPolicy
is getting rather bloated and is covering several behaviours. There's yet
another behaviour that could be added - the TX team review want a dfdl:defineNumberFormat
property called numberZeroRep to handle special zero representations. That's
fine - but on parsing whether to allow just the zero rep or both the rep
and '0' is a requirement from TX - which we could accomodate by extensing
numberCheckPolicy. Question is, are we overloading numberCheckPolicy, or
is it time to make it more granular?</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Regards<br>
<br>
Steve Hanson<br>
Programming Model Architect<br>
WebSphere Message Brokers<br>
Hursley, UK<br>
Internet: smh@uk.ibm.com<br>
Phone (+44)/(0) 1962-815848</font>
<br><font size=1 color=#800080 face="sans-serif">----- Forwarded by Steve
Hanson/UK/IBM on 16/07/2008 12:15 -----</font>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Steve Hanson/UK/IBM</b></font>
<p><font size=1 face="sans-serif">09/04/2008 15:44</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif"><mbeckerle.dfdl@gmail.com></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">dfdl-wg@ogf.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">RE: Fw: DFDL Decimal - proposal - correcting
wrong attachment</font><a href=Notes://D06ML070/802563ED00496501/38D46BF5E8F08834852564B500129B2C/5BC0C0759EDCE72080257426004D8748>Link</a></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br><font size=2 face="sans-serif">Hi Mike - answers in-line below.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Regards, Steve<br>
<br>
Steve Hanson<br>
Programming Model Architect<br>
WebSphere Message Brokers<br>
Hursley, UK<br>
Internet: smh@uk.ibm.com<br>
Phone (+44)/(0) 1962-815848</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>"Mike Beckerle"
<mbeckerle.dfdl@gmail.com></b> </font>
<p><font size=1 face="sans-serif">09/04/2008 15:05</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
<mbeckerle.dfdl@gmail.com></font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Steve Hanson/UK/IBM@IBMGB</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif"><dfdl-wg@ogf.org></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">RE: Fw: DFDL Decimal - proposal - correcting
wrong attachment</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 color=#000080 face="Arial">Thanks for these clarifications.</font>
<br><font size=2 color=#000080 face="Arial"> </font>
<br><font size=2 color=#000080 face="Arial">Do we have a way to represent
“unpacked” decimal numbers. This is like zoned, except the “zones”
are zero instead of “F” (in ebcdic encodings).</font>
<br><font size=2 face="sans-serif"><smh>No we don't. Neither MRM
nor TX support that. Have you seen such an example? Is it encoding
sensitive? <br>
</font>
<br><font size=2 color=#000080 face="Arial">Also, can a BCD number have
a sign?</font>
<br><font size=2 face="Arial"><smh>What we are calling a BCD can
not have a sign, as far as I know. That's where packed decimal comes in.</font>
<br><font size=2 color=#000080 face="Arial"> </font>
<br><font size=2 color=#000080 face="Arial">…mikeb</font>
<br><font size=2 color=#000080 face="Arial"> </font>
<div align=center>
<br>
<hr></div>
<br><font size=2 face="Tahoma"><b>From:</b> Steve Hanson [mailto:smh@uk.ibm.com]
<b><br>
Sent:</b> Wednesday, April 09, 2008 10:00 AM<b><br>
To:</b> mbeckerle.dfdl@gmail.com<b><br>
Cc:</b> 'Mike Beckerle'; Alan Powell; Ian W Parkinson<b><br>
Subject:</b> RE: Fw: DFDL Decimal - proposal - correcting wrong attachment</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 face="sans-serif"><br>
Hi Mike - answers in-line below.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Regards, Steve<br>
<br>
Steve Hanson<br>
Programming Model Architect<br>
WebSphere Message Brokers<br>
Hursley, UK<br>
Internet: smh@uk.ibm.com<br>
Phone (+44)/(0) 1962-815848</font><font size=3 face="Times New Roman">
<br>
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=43%><font size=1 face="sans-serif"><b>"Mike Beckerle"
<mbeckerle.dfdl@gmail.com></b> </font>
<p><font size=1 face="sans-serif">09/04/2008 01:43</font><font size=3 face="Times New Roman">
</font>
<p>
<br>
<table border=4 width=100%>
<tr valign=top>
<td width=100% bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
<mbeckerle.dfdl@gmail.com></font></div></table>
<br>
<td width=56%>
<br>
<table width=100%>
<tr valign=top>
<td width=10%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=89%><font size=1 face="sans-serif">Steve Hanson/UK/IBM@IBMGB,
Alan Powell/UK/IBM@IBMGB</font><font size=3 face="Times New Roman"> </font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">Ian W Parkinson/UK/IBM@IBMGB, 'Mike
Beckerle'</font><font size=3 face="Times New Roman"> </font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">RE: Fw: DFDL Decimal - proposal - correcting
wrong attachment</font></table>
<br><font size=3 face="Times New Roman"> </font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=50%><font size=3 face="Times New Roman"> </font>
<td width=50%><font size=3 face="Times New Roman"> </font></table>
<br></table>
<br><font size=3 face="Times New Roman"><br>
<br>
</font><font size=2 color=#000080 face="Arial"><br>
I prefer one property dfdl:numberFormat, the valid values of which depend
on dfdl:representation</font><font size=3 face="Times New Roman"> </font><font size=2 face="Arial"><br>
<smh>The advantage of two properties is that you can set scoping
for text and binary numbers separately. </font><font size=2 color=#000080 face="Arial"><br>
</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
I like the analysis that text formats are ones which depend on encoding,
and not byteOrder, and binary depend on byte order, and NOT encoding.</font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><br>
<smh>Me too.</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
There’s also format specifiers for floating point. Should those also go
on here, be allowed only for representation=”binary”?</font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><br>
<smh>I did think about this, but I think we are better off keeping
floats separate. Otherwise people might think you can declare a logical
float to be rep'd by physical integer. MRM allows this, and I wish it didn't.
It also exacerbates the problem noted above - I couldn't set a default
float format, which is something that would almost certainly never vary
within a data stream. </font><font size=2 color=#000080 face="Arial"><br>
</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
The rest of the proposal looks fine. I found decimalVirtualPoint an odd
name, but it is clear and obeys the conventions. </font><font size=2 face="Arial"><br>
<smh>I agree it's a bit odd. An alternative is 'decimalimpliedPlaces'
which uses TX terminology - but that doesn't match the 'V' pattern character
we are proposing in the ICU pattern (which matches COBOL)</font><font size=3 face="Times New Roman">
</font><font size=2 color=#000080 face="Arial"><br>
</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
I was a bit unclear on how do you represent an unsigned packed decimal.
This is common. There is no sign nibble at all. It lets you do an even
number of digits. MMDDYY is commonly this, 3 unsigned packed numbers.</font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><br>
<smh>What you have described is dfdl:numberFormat="BCD".
An unsigned packed decimal is dfdl:numberFormat="packed" with
the sign nibble always unsigned, so dfdl:packedDecimalSignCodes="F
F F".</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 color=#000080 face="Arial"><br>
</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
…mikeb</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
</font><font size=3 face="Times New Roman"> </font><font size=2 color=#000080 face="Arial"><br>
</font><font size=3 face="Times New Roman"> </font>
<div align=center>
<br><font size=3 face="Times New Roman"> </font>
<br>
<hr></div>
<br><font size=2 face="Tahoma"><b><br>
From:</b> Steve Hanson [mailto:smh@uk.ibm.com] <b><br>
Sent:</b> Wednesday, April 02, 2008 11:54 AM<b><br>
To:</b> Alan Powell<b><br>
Cc:</b> Ian W Parkinson; Mike Beckerle<b><br>
Subject:</b> Re: Fw: DFDL Decimal - proposal - correcting wrong attachment</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="sans-serif"><br>
<br>
Alan, Ian and myself reviewed this today.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
The main issue was that the loss of dfdl:representation="decimal"
means that it is no longer clear when to use dfdl:integerFormat and dfdl:decimalFormat,
because an xs:decimal can have a binary integer rep and an xs:int can have
a binary decimal rep. It was noted that both IBM models (MRM and TX type
tree) handle this by having a single property. I don't want to re-introduce
rep=decimal, I think we shoiuld stick with text (implying encoding sensitive)
and binary (potentially byte order sensitive). Options:</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
a) One property dfdl:numberFormat with values "text", "zoned",
"packed", "BCD", "twosComplement", "onesComplement",
"signMagnitude".</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
- "text" and "zoned" when dfdl:representation="text"</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
- "packed", "BCD", "twosComplement", "onesComplement",
"signMagnitude" when dfdl:representation="binary"</font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier New"><br>
<br>
Number xs:int, xs:decimal
text => numberFormat</font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier New"><br>
<br>
xs:float, xs:double
text =></font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier New"><br>
<br>
xs:int, xs:decimal
binary =>
numberFormat</font><font size=3 face="Times New Roman"> </font><font size=2 face="Courier New"><br>
<br>
xs:float
binary => floatFormat</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="sans-serif"><br>
<br>
b) Two properties dfdl:textNumberFormat and dfdl:binaryNumberFormat, allowable
enums split as above.</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
- this means the existing dfdl:textNumberFormat property gets renamed to
dfdl:textNumberPattern or dfdl:textNumberScheme</font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier"><br>
<br>
Number xs:int, xs:decimal
text => textNumberFormat</font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier"><br>
<br>
xs:float, xs:double
text =>
</font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier"><br>
<br>
xs:int, xs:decimal
binary =>
binaryNumberFormat</font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier"><br>
<br>
xs:float
binary => floatFormat</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Other suggestions?</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
Regards, Steve<br>
<br>
Steve Hanson<br>
WebSphere Message Brokers<br>
Hursley, UK<br>
Internet: smh@uk.ibm.com<br>
Phone (+44)/(0) 1962-815848</font><font size=3 face="Times New Roman">
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=24%><font size=1 face="sans-serif"><b>Alan Powell/UK/IBM</b></font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="sans-serif">28/03/2008 16:45</font><font size=3 face="Times New Roman">
</font>
<td width=75%><font size=3 face="Times New Roman"> </font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=9%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=90%><font size=1 face="sans-serif">Steve Hanson/UK/IBM@IBMGB</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">Ian W Parkinson/UK/IBM@IBMGB, mbeckerle@oco-inc.com</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: Fw: DFDL Decimal - proposal - correcting
wrong attachment</font><a href=Notes://d06ml070/802563ED00496501/38D46BF5E8F08834852564B500129B2C/378267E0649073098025741A004CDBF1><font size=3 color=blue face="Times New Roman"><u>Link</u></font></a></table>
<br><font size=3 face="Times New Roman"><br>
</font>
<p><font size=3 face="Times New Roman"> </font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=66%><font size=3 face="Times New Roman"> </font>
<td width=33%><font size=3 face="Times New Roman"> </font></table>
<br></table>
<p><font size=3 face="Times New Roman"><br>
</font><font size=2 face="sans-serif"><br>
<br>
Steve</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
Technically seems OK.</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
Need quite a bit of editorial work before it can be included in the spec
which I have started.</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
<br>
Alan Powell<br>
<br>
MP 211, IBM UK Labs, Hursley, Winchester, SO21 2JN, England<br>
Notes Id: Alan Powell/UK/IBM email: alan_powell@uk.ibm.com
<br>
Tel: +44 (0)1962 815073
Fax: +44 (0)1962 816898</font>
<p>
<table width=100%>
<tr valign=top>
<td width=13%><font size=1 color=#5f5f5f face="sans-serif">From:</font><font size=3 face="Times New Roman">
</font>
<td width=86%><font size=1 face="sans-serif">Steve Hanson/UK/IBM</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font><font size=3 face="Times New Roman">
</font>
<td><font size=1 face="sans-serif">mbeckerle@oco-inc.com</font><font size=3 face="Times New Roman">
</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font><font size=3 face="Times New Roman">
</font>
<td><font size=1 face="sans-serif">Alan Powell/UK/IBM, Ian W Parkinson/UK/IBM</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font><font size=3 face="Times New Roman">
</font>
<td><font size=1 face="sans-serif">28/03/2008 13:59</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font><font size=3 face="Times New Roman">
</font>
<td><font size=1 face="sans-serif">Fw: DFDL Decimal - proposal - correcting
wrong attachment</font></table>
<p><font size=3 face="Times New Roman"><br>
</font>
<div align=center>
<br><font size=3 face="Times New Roman"> </font>
<br>
<hr noshade></div>
<br><font size=3 face="Times New Roman"><br>
</font><font size=2 face="sans-serif"><br>
<br>
Here's an attempt at a revised decimal supplement, that takes into account
the stuff in my mail below.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
[attachment "ggf-dfdl-supplement-advanced-decimal-properties-v1.0-003.doc"
deleted by Alan Powell/UK/IBM] <br>
<br>
Some discussion points:</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
1) I've removed the representation 'Decimal' - a decimal is either 'Text'
or 'Binary'. Property decimalFormat says whether it is text or zoned
(for text) or packed or BCD (for binary). <br>
<br>
2) There's no need for a decimalSigned property, as zoned uses numberPattern
for this, BCD is always unsigned, and packed indicates this via sign code</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
3) I've added VDP property for BCD and packed - zoned uses numberPattern
for this. However, VDP property is also needed for binary integers
- this is missing from spec. COBOL PIC 99V99 COMP will create an xs:decimal
with binary integer rep, so we need to support this. I suggest we have
a single VDP property that applies to all binary reps that can be used
to represent xs:decimal. So my VDP property gets removed to main spec.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
4) The resultant properties are less than before. I'm not sure that a separate
supplement is justified.</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
5) I would like to remove numberCheckPolicy from dfdl:DefineNumberFormat,
and make it a separate property. Two reasons: <br>
- I think the decision to use strict/lax checking is not an attribute of
the number format but more an attribute of the schema as a whole.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
- It means we can control packed decimal sign nibble oddities with the
same property as other strict/lax number checking,</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Let's review on next OGF WG call.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Regards, Steve<br>
<br>
Steve Hanson<br>
Programming Model Architect<br>
WebSphere Message Brokers<br>
Hursley, UK<br>
Internet: smh@uk.ibm.com<br>
Phone (+44)/(0) 1962-815848</font><font size=3 face="Times New Roman">
</font><font size=1 color=#800080 face="sans-serif"><br>
----- Forwarded by Steve Hanson/UK/IBM on 28/03/2008 12:33 -----</font><font size=3 face="Times New Roman">
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=46%><font size=1 face="sans-serif"><b>Steve Hanson/UK/IBM</b>
</font>
<p><font size=1 face="sans-serif">27/03/2008 15:29</font><font size=3 face="Times New Roman">
</font>
<td width=53%><font size=3 face="Times New Roman"> </font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=23%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=76%><font size=1 face="sans-serif">Mike Beckerle (Work)</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=3 face="Times New Roman"> </font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">DFDL Decimal - proposal</font></table>
<br><font size=3 face="Times New Roman"><br>
</font>
<p><font size=3 face="Times New Roman"> </font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=66%><font size=3 face="Times New Roman"> </font>
<td width=33%><font size=3 face="Times New Roman"> </font></table>
<br></table>
<p><font size=3 face="Times New Roman"><br>
</font><font size=2 face="sans-serif"><br>
<br>
Hi Mike</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
I've finally got round to looking at the decimal supplement, and I'd like
to get your opinion on something. The WTX team have been reviewing draft
031 and had the following observation (actually they had quite a few good
ones, and when they've finished we need to discuss them all on a OGF WG
call).</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><b><br>
<br>
"13.3. Is a zoned decimal textual or non-textual? If all overpunched
variants result in well-known characters then the data is scannable and
therefore more like a textual field."</b></font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
It turns out that the type hierarchy in TX for decimal looks like below.
They consider Zoned as text as it always consists of reasonable characters
and is subject to encoding conversion, padding, justification, etc. There's
a lot of appeal in that. It's always bothered me a bit that MRM viewed
it as a binary type.</font><font size=3 face="Times New Roman"> </font><font size=2 face="Courier New"><br>
<br>
Number -> Character -> Decimal (meaning text decimal)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier New"><br>
Integer (meaning text integer)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Courier New"><br>
Zoned</font><font size=3 face="Times New Roman"> </font><font size=2 face="Courier New"><br>
-> Binary -> Integer (meaning binary
integer)</font><font size=3 face="Times New Roman"> </font><font size=2 face="Courier New"><br>
Float</font><font size=3 face="Times New Roman"> </font><font size=2 face="Courier New"><br>
Packed</font><font size=3 face="Times New Roman"> </font><font size=2 face="Courier New"><br>
BCD</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
Also, their Zoned does not have separate sign option. They point out that
a separate signed Zoned is just a Text decimal. And they are correct. We
got the separate sign thing from MRM, which after some digging turns out
to have got it from the CAM Type Descriptor model, which had no other way
of representing a text decimal number with a separate sign.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
As part of my rework of the decimal supplement, I'd like to take both these
into account. The implications are:</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
- Zoned => overpunched only</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
- Zoned decimal can pick up on the textNumberxxx properties, including
textNumberFormat <br>
=> use the numberPattern (ie, ICU pattern) property
to say which end the (overpunched) sign goes</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
=> can get away without a separate pattern language
for binary decimals, which as you point out has endian-ness issues</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
- Binary decimals are packed and BCD</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
- There are a lot fewer properties for decimals</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
- dfdl:representation = "text" can have subdivisions - that's
not occurred until now (we could think about making dfdl:representation
= "xml" a subdivision of "text"?)</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
If you think there is merit in this approach then let me know by return
and I'll see if I can write something up tomorrow.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
I'm WAH on +44-1794-340899 if you want to discuss.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Your "crazy idea" below is interesting - but I think is a tooling
thought rather than a core spec thing.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
(Sorry about call yesterday - I thought I mailed something out a couple
of calls ago about DST mismatch, but perhaps I didn't).</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Regards, Steve<br>
<br>
Steve Hanson<br>
Programming Model Architect<br>
WebSphere Message Brokers<br>
Hursley, UK<br>
Internet: smh@uk.ibm.com<br>
Phone (+44)/(0) 1962-815848</font><font size=3 face="Times New Roman">
</font><font size=1 color=#800080 face="sans-serif"><br>
----- Forwarded by Steve Hanson/UK/IBM on 27/03/2008 15:04 -----</font><font size=3 face="Times New Roman">
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Mike Beckerle/Worcester/IBM@IBMUS</b></font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="sans-serif">21/11/2007 15:26</font><font size=3 face="Times New Roman">
</font>
<td width=59%><font size=3 face="Times New Roman"> </font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=10%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=89%><font size=1 face="sans-serif">Steve Hanson/UK/IBM@IBMGB</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">DFDL-Technical-Core, Suman Kalia/Toronto/IBM@IBMCA</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">DFDL Decimal - was Re: DFDL & length
prefixes - proposal</font><a href=Notes://d06ml070/802563ED00496501/38D46BF5E8F08834852564B500129B2C/95CF5EF523B34A158025739A0045C41B><font size=3 color=blue face="Times New Roman"><u>Link</u></font></a></table>
<br><font size=3 face="Times New Roman"><br>
</font>
<p><font size=3 face="Times New Roman"> </font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=66%><font size=3 face="Times New Roman"> </font>
<td width=33%><font size=3 face="Times New Roman"> </font></table>
<br></table>
<p><font size=3 face="Times New Roman"><br>
</font><font size=2 face="sans-serif"><br>
<br>
I think decimal has signed and unsigned variants based on dfdl:decimalSigned
boolean. If this is false then it's unsigned and packedUnsignedRep specifies
the sign nibble used for unsigned. The doc doesn't specify that one can
say "" for this indicating no sign nibble at all. <br>
<br>
I've been rereading the decimal properties supplement and starting v002
of it based on changes to dfdl:representation in the core spec. This needs
a general clean up. There's errors here in that there is a decimalType="zoned",
or "packed" or "BCD" and also a bcdIsPacked, and bcdUnpackedRep="ebcdic",
which is the same as zoned I think. <br>
<br>
We need there to be one way to express these things. Right now the bias
is a set of orthogonal flags: signed or unsigned, what's the sign nibble
for unsigned, what sign nibbles for signed, packed or unpacked, what's
in the zones - the unused nibbles - (ebcdic, i.e., "F",
ascii, i.e., "3", or zero - but that's not enough as I've seen
data with "2" in the zones - some non IBM cobol compiler does
this.). <br>
<br>
A better choice may be to specify decimalType as a larger enum which includes
most of these properties, so that we don't end up with too much ability
to express variants that have simply never existed. <br>
<br>
A list of the use cases needs to be added to the doc also.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Here's a few:</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
-1234 as expressed as bytes in hex in increasing position order, i.e.,
LSB first.</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
packed ibm, signed, D01234</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
zoned ibm, overpunched leading sign D1F2F3F4 (are signs usually leading
or trailing.... I think trailing actually.)</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
big endian zoned ascii, ascii-translated overpunched leading sign 4A323334
(yuck - so much for treating decimal as "binary" data).</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Here's a crazy idea: I believe there is a set of magic numbers which if
you give me their translations in bytes, I can determine exactly what the
encoding properties are.</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
E.g., if you give me the bytes for +0000, -1234, +789 I believe I
can determine all of the properties.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
This might be a better way to specify decimal formats. I.e., give me those
byte patterns expressed as hex, and I reverse engineer all the property
settings.</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
e.g., decimalFormat="+0000=C00000-1234=D01234 +789=C789" (signed,
packed, leading sign, padded to even number of nibbles, big endian, zero
carries a sign, "C" is plus, "D" is minus)</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
or decimalFormat="+0000=00000000 -1234=D1F2F3F4 +789=C7F8F9"
(ebcdic zoned, leading overpunched sign, big endian, zero is allowed to
have zero as sign and all zero bytes, "C" is plus, "D"
is minus)</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
This may make more sense for the tooling than the DFDL language though.
I.e., point it at some data and it tries to guess these properties. <br>
<br>
Mike Beckerle<br>
STSM, Architect, Scalable Computing<br>
IBM Software Group<br>
Information Platform and Solutions<br>
Westborough, MA 01581<br>
direct: voice and FAX 508-599-7148<br>
assistant: Pam Riordan <br>
priordan@us.ibm.com
<br>
508-599-7046</font><font size=3 face="Times New Roman"><br>
<br>
<br>
<br>
</font>
<div align=center>
<br><font size=3 face="Times New Roman"> </font>
<br>
<hr></div>
<br><font size=3 face="Times New Roman"><br>
</font>
<p><font size=2 face="sans-serif"><i>Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU</i></font><font size=3 face="Times New Roman"> </font>
<p><font size=3 face="Times New Roman"><br>
<br>
<br>
</font><font size=3 face="sans-serif"><br>
<br>
</font>
<div align=center>
<br>
<hr></div>
<br><font size=3 face="Times New Roman"> </font>
<p><font size=2 face="sans-serif"><i>Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU</i></font><font size=3 face="Times New Roman"> </font>
<p><font size=3 face="sans-serif"><br>
</font><font size=3 face="Times New Roman"><br>
<br>
</font>
<br><font size=3 face="sans-serif"><br>
</font>
<br><font size=3 face="sans-serif"><br>
</font>
<hr><font size=2 face="sans-serif"><br>
<i><br>
</i></font>
<p><font size=2 face="sans-serif"><i>Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU</i></font>
<p><font size=2 face="sans-serif"><br>
</font><font size=3 face="sans-serif"><br>
</font>
<br>
<br><font size=3 face="sans-serif"><br>
<br>
</font>
<br><font size=3 face="sans-serif"><br>
</font>
<hr><font size=2 face="sans-serif"><br>
<i><br>
</i></font>
<p><font size=2 face="sans-serif"><i>Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU</i></font>
<p><font size=2 face="sans-serif"><br>
</font><font size=3 face="sans-serif"><br>
</font>
<br>
<br><font size=3 face="sans-serif"><br>
</font>