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 » Optional Field Parsing error

Post new topic  Reply to topic
 Optional Field Parsing error « View previous topic :: View next topic » 
Author Message
Veera B
PostPosted: Wed Feb 06, 2013 2:31 am    Post subject: Optional Field Parsing error Reply with quote

Voyager

Joined: 16 Jan 2013
Posts: 76

Hi All,

I am having a message set of mostly character fields but inbetween having few integer ones. All the fields are optional.

There is no parsing error if i give all fields in input message and also give blank for character fields, but if i dont give input data for Integer fields the parsing will stop at that point and further elements are not processed, even though it is optional field.

Also I am using a esql parse funtion for this, i have tried varying the CCSID and ENCODING for this but no use. ( Currently using CCSID : 500 ENCODING 785)

need few suggestions please ..
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 06, 2013 4:06 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Let's start off by saying that it has nothing to do with the fact that certain fields are of integer type or not.

It has everything to do with how the message definition is created.

You have created the message definition in such a way that it either deems the message complete when it reads the first integer field, or that it then fails to match further fields after the first integer field and generates an error.
Back to top
View user's profile Send private message
cociu_2012
PostPosted: Wed Feb 06, 2013 4:31 am    Post subject: Re: Optional Field Parsing error Reply with quote

Acolyte

Joined: 06 Jan 2012
Posts: 72

Veera B wrote:
but if i dont give input data for Integer fields the parsing will stop at that point and further elements are not processed, even though it is optional field.


Just a thougth, have you tried validating your message against its definision?
I’m quite sure it will fail using other validating tools. If not, you probably need to check your message set.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Feb 06, 2013 5:32 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please state which version of WMB you are using.
Please state which type of physical format your message set is using ( CWF / TDS )
Please give an example of a working message and a failing message.

Finally, please quote the error message that you are receiving. For bonus points, post the output of a debug-level user trace.
Back to top
View user's profile Send private message
Veera B
PostPosted: Wed Feb 06, 2013 5:43 pm    Post subject: Reply with quote

Voyager

Joined: 16 Jan 2013
Posts: 76

mqjeff wrote:
Let's start off by saying that it has nothing to do with the fact that certain fields are of integer type or not.

It has everything to do with how the message definition is created.

You have created the message definition in such a way that it either deems the message complete when it reads the first integer field, or that it then fails to match further fields after the first integer field and generates an error.



ok. I have created all elements as global elements and then added the elements as reference to complex types, then added these complex types to Global Message element.

I need all message field data to be optional, for flexibility of input msg. how to achieve that ...

cociu_2012 wrote:
Just a thougth, have you tried validating your message against its definision?


would you please consider explaining how to do that, or give the link for research.

kimbert wrote:
Finally, please quote the error message that you are receiving. For bonus points, post the output of a debug-level user trace.


I am not getting any error while parsing ( using esql Parse function), but the elements after the blank input field do not get parsed or populated , i get error later because of missing fields.

Using MB 6.1, physical format CWF, working message has input data for all fields, but the not working message has blank(spaces) data for one integer field in the middle after which further fields don't populate.

I am posting the error from User Trace.


ConversionException BIP5505E: A data conversion failed because the data was invalid.
Type of data being read: 'decimal'
Data: ' '

Data conversion when reading or writing a message failed because the input data was invalid for the output data type.
Back to top
View user's profile Send private message
cociu_2012
PostPosted: Wed Feb 06, 2013 11:54 pm    Post subject: Reply with quote

Acolyte

Joined: 06 Jan 2012
Posts: 72

Veera B wrote:


Using MB 6.1, physical format CWF, working message has input data for all fields, but the not working message has blank(spaces) data for one integer field in the middle after which further fields don't populate.

I am posting the error from User Trace.


ConversionException BIP5505E: A data conversion failed because the data was invalid.
Type of data being read: 'decimal'
Data: ' '

Data conversion when reading or writing a message failed because the input data was invalid for the output data type.


Is "white space (blank)" a valid value for an integer? If you define an element as integer - optional (with no xsi- nillable attribute) it must have an integer value or it must miss from the input.
An XML example:

Invalid:
Code:

<structure>
   <string_element>data</string_element>
   <string_element1></string_element1>
   <integer_element>0</integer_element>
   <integer_element1></integer_element1>
   <integer_element2>0</integer_element2>
   <string_element2>data1</string_element2>
</structure>


Valid:
Code:

<structure>
   <string_element>data</string_element>
   <string_element1></string_element1>
   <integer_element>0</integer_element>
   --integer_element1 is missing!
   <integer_element2>0</integer_element2>
   <string_element2>data1</string_element2>
</structure>


I hope it will help.
Back to top
View user's profile Send private message
Veera B
PostPosted: Thu Feb 07, 2013 1:15 am    Post subject: Reply with quote

Voyager

Joined: 16 Jan 2013
Posts: 76

cociu_2012 wrote:
Is "white space (blank)" a valid value for an integer? If you define an element as integer - optional (with no xsi- nillable attribute) it must have an integer value or it must miss from the input.


Thank you very much .. my understanding is a lot better now ..

Also, I was giving white spaces for integer field with padding character defined as '0' , if i change that padding chars to SPACE, It's working
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 » Optional Field 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.