Author |
Message
|
yellowbee |
Posted: Tue Apr 04, 2017 12:51 pm Post subject: DFDL Parser - element parsing starting with value Zero |
|
|
 Acolyte
Joined: 14 Apr 2012 Posts: 58
|
Hi ,
I am facing issue with DFDL parser.
while parsing BLOB to DFDL ,getting issue while parsing the value if the field value is starting with zero.
XSD specific to that particular element as below.
</xsd:element>
<xsd:element default="0" dfdl:encoding="{$dfdl:encoding}" dfdl:length="7" dfdl:textNumberPattern="0000000+" name="W01_status_time">
<xsd:annotation>
<xsd:documentation>PIC 9(7) display</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="dfdlCobolFmt:PIC9-Display-Zoned__int">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="9999999"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
if the input value as 0122334 after the parsing the value coming as 122334,but if the input value is 0000013 then the output value after parsing coming as 13(we are expecting the value should be as 000013).
Please advice do i need to do any modifications in the DFDL properties?
Thanks in advance. |
|
Back to top |
|
 |
timber |
Posted: Tue Apr 04, 2017 2:59 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
if the input value as 0122334 after the parsing the value coming as 122334,but if the input value is 0000013 then the output value after parsing coming as 13(we are expecting the value should be as 000013). |
Are you looking at
a) the value in the message tree or
b) the value after writing the message to the output?
If a) then you are missing the whole point of having a logical message tree. The value will be an integer in the message tree. That integer will be converted into some kind of physical representation (perhaps even a string with leading zeroes) when it is written by an output node. |
|
Back to top |
|
 |
yellowbee |
Posted: Wed Apr 05, 2017 12:10 am Post subject: |
|
|
 Acolyte
Joined: 14 Apr 2012 Posts: 58
|
Hi Timber,
in both cases the message tree and in output i am not seeing the zeros which are before 13.we are converting the BLOB data using DFDL using RCD node in the flow. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 05, 2017 4:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The input message is parsed into a logical message tree using the DFDL definition.
The logical message tree is serialized into the output message using the DFDL.
If the fields in the output message don't match what you want,it's because your DFDL definition isn't configured to produce what you want. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
yellowbee |
Posted: Wed Apr 05, 2017 10:07 am Post subject: |
|
|
 Acolyte
Joined: 14 Apr 2012 Posts: 58
|
Yes,
I need your help regarding the configuration i have to do in DFDL to get the desired output.
Thanks. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 05, 2017 12:29 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
|