ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL Parsing Error

Post new topic  Reply to topic
 DFDL Parsing Error « View previous topic :: View next topic » 
Author Message
naveeng
PostPosted: Wed Feb 01, 2017 5:08 am    Post subject: DFDL Parsing Error Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Feb 01, 2017 5:34 am    Post subject: Re: DFDL Parsing Error Reply with quote

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
View user's profile Send private message
naveeng
PostPosted: Fri Feb 17, 2017 4:00 am    Post subject: Re:DFDL Parsing Error Reply with quote

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
View user's profile Send private message
timber
PostPosted: Fri Feb 17, 2017 4:20 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

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
View user's profile Send private message
naveeng
PostPosted: Tue Feb 21, 2017 4:11 am    Post subject: DFDL Parsing Error Reply with quote

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
View user's profile Send private message
timber
PostPosted: Tue Feb 21, 2017 8:02 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

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
View user's profile Send private message
naveeng
PostPosted: Tue Feb 21, 2017 8:18 am    Post subject: Reply with quote

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
View user's profile Send private message
naveeng
PostPosted: Tue Feb 21, 2017 8:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Tue Feb 21, 2017 9:07 am    Post subject: Reply with quote

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
View user's profile Send private message
naveeng
PostPosted: Wed Feb 22, 2017 2:55 am    Post subject: DF Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 22, 2017 4:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Feb 22, 2017 6:00 am    Post subject: Re: DF Reply with quote

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
View user's profile Send private message
naveeng
PostPosted: Mon Feb 27, 2017 10:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Tue Feb 28, 2017 4:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Tue Feb 28, 2017 5:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL Parsing Error
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.