[
https://issues.apache.org/jira/browse/DAFFODIL-2873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dave Thompson closed DAFFODIL-2873.
-----------------------------------
Verified the specified commit (commit 3ce37b4a1dd0405657c1633f4c2888d280c96d95)
is included in the latest pull from the daffodil repository.
Verified, via review, changes identified in the commit comment were
implemented.
Verified the affected daffodil subproject sbt test suites executed
successfully, including the modified and added tests.
> zoned EBCDIC signed negative numbers not parsed correctly
> ---------------------------------------------------------
>
> Key: DAFFODIL-2873
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2873
> Project: Daffodil
> Issue Type: Bug
> Components: Back End
> Affects Versions: 3.6.0
> Reporter: Mike Beckerle
> Assignee: Mike Beckerle
> Priority: Major
> Fix For: 3.7.0
>
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> For zoned decimal numbers, if the encoding is ascii-based then the proeprty
> dfdl:textZonedSignStyle is used to determine how the signs are overpunched.
>
> But if the encoding is ebcdic based, then this property is supposed to be
> ignored.
> This appears to not be happening.
>
> In the COBOL1 example (on DFDLSchemas github), a number has this type:
>
> {code:java}
> <simpleType
> name="displayMoney7Digits"
> dfdl:representation="text"
> dfdl:textNumberRep="zoned"
> dfdl:encoding="ebcdic-cp-us"
> dfdl:decimalSigned="yes"
> dfdl:textNumberPattern="+0000000V00"
> dfdl:length="9">
> <restriction base="xs:decimal" >
> <maxInclusive value="9999999.99"/>
> <minInclusive value="-9999999.99"/>
> </restriction>
> </simpleType> {code}
> The data is:
> {code:java}
> R99999999 {code}
> But the R is not accepted as a -9 digit with negative overpunched. This is
> EBCDIC character D9 which is the D minus indicator overpunched on the zone of
> the 9 digit.
> The error message is:
> {code:java}
> org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil)
> ParseError: Parse Error: Unable to parse zoned xs:decimal from text:
> R99999999. Invalid zoned digit: R
> Schema context: TOTAL-CHARGES Location line 84 column 8 in
> .../Cobol/target/classes/cobol1.dfdl.xsd
> Data location was preceding byte 90 {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)