Author |
Message
|
naveeng |
Posted: Wed Feb 01, 2017 5:08 am Post subject: DFDL Parsing Error |
|
|
Novice
Joined: 10 Jan 2011 Posts: 16
|
Hi,
In our project we are converting the webservice request to cobol request and vice-versa. we are facing parsing error once we are receiving the cobol response. Below is the error description : -
An error occurred whilst parsing with DFDL CTDP3053E: Zoned text to number conversion error for element '#xscd(/type::ABCD1RP/model::sequence/schemaElement::RP_VAR_DATA_BLOCK/type::0/model::sequence/schemaElement::RP_STORAGE/type::0/model::sequence/schemaElement::SP_STORAGES_CNT)': Y0
In the copybook the above field is declared as : -
22 SP-STORAGES-COUNT PIC 9(00002).
After incorporating the copy book into mb(DFDL)it is represented as below:-
22 SP-STORAGES-COUNT PIC9-Display-Zoned_short with Min Occurance and Max Occurance as 1 and its default value& sample value set to 0.
In the MB Layer ESQL it is handled in below manner : -
SET outStorageRef.nsHome:StorageCount.nsHomtype:Numeric2 = inRef.RP_VAR_DATA_BLOCK.RP_STORAGE.SP_STORAGES_CNT;
Please let me know if any more information is required. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Feb 01, 2017 5:34 am Post subject: Re: DFDL Parsing Error |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
naveeng wrote: |
Please let me know if any more information is required. |
What's in the actual field? Is it a valid number? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
naveeng |
Posted: Fri Feb 17, 2017 4:00 am Post subject: Re:DFDL Parsing Error |
|
|
Novice
Joined: 10 Jan 2011 Posts: 16
|
Hi Vitor,
Thanks for the quick reply. Sorry for the delay in my response as I was having some personal emergency couldnot respond in time.
Y0 is being passed in the field. |
|
Back to top |
|
 |
timber |
Posted: Fri Feb 17, 2017 4:20 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Zoned decimals contain binary information at the beginning or end. So it is not enough to quote the *text* value of the field. You need to look at the bytes.
There are various types of zoned decimal, with the sign encoded in different ways on the first/last digit. You will need to understand (in detail) which type of zoned decimal your COBOL program is supplying, and how to set the DFDL properties to match your COBOL definition. Consult the DFDL specification for the details. |
|
Back to top |
|
 |
naveeng |
Posted: Tue Feb 21, 2017 4:11 am Post subject: DFDL Parsing Error |
|
|
Novice
Joined: 10 Jan 2011 Posts: 16
|
Hi timber,
I have opened the corresponding updated DFDL(in which I am facing parsing problem) in xml editor and have found the below in source view : -
Code: |
<xsd:element default="0" dfdl:decimalSigned="no" dfdl:length="2" dfdl:textNumberPattern="00+" name="SP_STORAGES_COUNT">
<xsd:annotation>
<xsd:documentation>PIC 9(2) display</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="dfdlCobolFmt:PIC9-Display-Zoned__short">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="99"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element> |
I have opened the old DFDL in xml editor and have found the below in source view : -
Code: |
<xsd:element default="0" dfdl:length="2" dfdl:occursCountKind="implicit" dfdl:textNumberPattern="00+" minOccurs="0" name="SP_STORAGES_COUNT">
<xsd:annotation>
<xsd:documentation>PIC 9(2) display</xsd:documentation>
<xsd:appinfo source="http://www.ogf.org/dfdl/">
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="dfdlCobolFmt:PIC9-Display-Zoned__short">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="99"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element dfdl:lengthKind="implicit" dfdl:occursCount="{/HORCP1RP/RP_VAR_DATA_BLOCK/RP_STORAGE/SP_STORAGES_COUNT}" dfdl:occursCountKind="implicit" maxOccurs="99" minOccurs="0" name="SP_STORAGES">
<xsd:annotation> |
Can you help if there is any diff because of which I am facing the parsing error.
Please let me know if you need any more info. |
|
Back to top |
|
 |
timber |
Posted: Tue Feb 21, 2017 8:02 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
I have opened the old DFDL in xml editor |
I have no idea what you mean by 'old DFDL'. Please explain. |
|
Back to top |
|
 |
naveeng |
Posted: Tue Feb 21, 2017 8:18 am Post subject: |
|
|
Novice
Joined: 10 Jan 2011 Posts: 16
|
what I meant by old DFDL file(incorporated using the given copybook HORBC1RP) is the one existing in production environment.
I have been given new copybook HORBC1RP with some changes done w.r.t occurences. using this I generated new DFDL.
For example:-
In old copy book :22 SP-STORAGES OCCURS 00099.
In new copy book: 22 SP-STORAGES OCCURS 00005. |
|
Back to top |
|
 |
naveeng |
Posted: Tue Feb 21, 2017 8:36 am Post subject: |
|
|
Novice
Joined: 10 Jan 2011 Posts: 16
|
Hi Vitor,
Also can you let me know if in a copybook when one element is defined as below
22 SP-STORAGES-COUNT PIC 9(00002).
and after incorporation it into toolkit DFDL It is being represented as below : -
SP_STORAGES_COUNT <PIC9-Display-Zoned_short>
what is the valid data it can handle.
Can it handle/accept Y0. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 21, 2017 9:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
naveeng wrote: |
Also can you let me know if in a copybook when one element is defined as below
22 SP-STORAGES-COUNT PIC 9(00002).
and after incorporation it into toolkit DFDL It is being represented as below : -
SP_STORAGES_COUNT <PIC9-Display-Zoned_short>
what is the valid data it can handle.
Can it handle/accept Y0. |
That picture clause doesn't look a lot like it's DFDL representation. What are the actual attributes in the DFDL model? Calling it "PIC9-Display_Zoned_short" makes it sound like a short integer (which could in some implementations be X'Y0') but that picture clause is an unsigned display variable in which X'Y0' would be invalid.
Post the actual DFDL definition not just what the import wizard called it. Specifically data type (char, integer, decimal, etc.) and length. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
naveeng |
Posted: Wed Feb 22, 2017 2:55 am Post subject: DF |
|
|
Novice
Joined: 10 Jan 2011 Posts: 16
|
Hi Vitor,
I have tried reading the response using RFHUtil and below is the representation : -
Level Ofs Len Type Occ Variable Name Value
22 1004 2 NUMB SP-STORAGES-COUNT Y0
I could not understand what is meant by actual DFDL definition. Please let me know how to get the actual DFDL definition.
from my client I have received only copy book with .CBL extension. Can you please help me know if there is any way to generate DFDL definition using any tool or any other means. In my toolkit I am able to open the incorporated DFDL in the below three perspectives : -
text editor
xml editor
xml schema editor
[/img] |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Feb 22, 2017 4:47 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What is the first field? Does it always occur first? Is it a fixed length, or does it end at some character?
Likewise, what is the second field and etc. etc.
Are the fields always in the same order - that is the same sequence ? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Wed Feb 22, 2017 6:00 am Post subject: Re: DF |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
naveeng wrote: |
I could not understand what is meant by actual DFDL definition. Please let me know how to get the actual DFDL definition. |
It's what you posted above. My bad
That's not the definition of what you have. Note that the "new" one has decimalSigned=no when the "old" one does not.
naveeng wrote: |
from my client I have received only copy book with .CBL extension. Can you please help me know if there is any way to generate DFDL definition using any tool or any other means. |
Aside from the IIB Toolkit, which comes with the ability to convert COBOL copybooks to DFDL built in?
naveeng wrote: |
In my toolkit I am able to open the incorporated DFDL in the below three perspectives : -
text editor
xml editor
xml schema editor
|
And of course the DFDL editor.
That copybook still doesn't match the data you're being sent. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
naveeng |
Posted: Mon Feb 27, 2017 10:30 pm Post subject: |
|
|
Novice
Joined: 10 Jan 2011 Posts: 16
|
Hi Vitor,
If I remove the "decimalSigned=no " from the new one using the xml editor will the copybook be able to match the data I am being sent? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Feb 28, 2017 4:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
naveeng wrote: |
Hi Vitor,
If I remove the "decimalSigned=no " from the new one using the xml editor will the copybook be able to match the data I am being sent? |
Isn't there a DFDL model tester in newer versions of the IIB toolkit?
Wouldn't that be helpful? I would probably use it. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 28, 2017 5:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
naveeng wrote: |
If I remove the "decimalSigned=no " from the new one using the xml editor will the copybook be able to match the data I am being sent? |
So you're asking if you change the "new" DFDL so it's the same as the "old" one, will it start working the way it used to?
Ever consider trying it?
Once you've got that working, you can ponder the question of why the "old" DFDL includes a definition of the COBOL OCCURS clause in the copybook but your "new" one does not, and what problems that might cause...... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|