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 » Null character problem

Post new topic  Reply to topic
 Null character problem « View previous topic :: View next topic » 
Author Message
manoj5007
PostPosted: Wed Jul 27, 2016 11:16 pm    Post subject: Opening a old thread but with new version Reply with quote

Acolyte

Joined: 15 May 2013
Posts: 64

Got a flow where we can expect 3 types of input MRM message from source system, so the flow goes as below:


SrcQ ->Set message properties ->Transformation ->OutputQ


Based on a value at a particular point we apply the message set to the message at the second node and further transform the message and process to OutputQ

Now at times the source system sends NUL characters values in a field of length 10, so 10 nul characters are present and we do a direct mapping and form the output xml message.

Question: Now, how do we handle these null characters at ESB so that when we send to output queue, there should be a blank tag or no tag informed instead of the tag being populated with 10 null characters as its value

Thanks in advance.
Back to top
View user's profile Send private message
manoj5007
PostPosted: Wed Jul 27, 2016 11:28 pm    Post subject: Reply with quote

Acolyte

Joined: 15 May 2013
Posts: 64

This is in version 9.0.0.3
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 28, 2016 4:26 am    Post subject: Re: Opening a old thread but with new version Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

manoj5007 wrote:
Now, how do we handle these null characters at ESB so that when we send to output queue, there should be a blank tag or no tag informed instead of the tag being populated with 10 null characters as its value


Change the mapping accordingly.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
manoj5007
PostPosted: Thu Jul 28, 2016 5:25 pm    Post subject: Reply with quote

Acolyte

Joined: 15 May 2013
Posts: 64

My question is how do i eliminate the ten null characters at the message set level ??The source system has told they are not able to do the change, i.e. sending some other characters in the place of null characters.

We can expect these characters in other fields too going forward.

Hmmm..Wondering how we achieve this.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Jul 28, 2016 9:58 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Null fill is pretty common when dealing with fixed length data structures.
You can model the MRM parsing to deal with this.

Why not do some experimentation and see what works and what does not? You will learn more by trying things for yourself.
By all means come back with specific questions like, "I tried this and got this."

One useful way is to reverse the model. Create a message tree that looks like what you want to see after parsing and then pass it out through your model and compare it with the input sample that you have.
Learning how to create an element that has no content is very useful.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Jul 29, 2016 4:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
My question is how do i eliminate the ten null characters at the message set level?
This is a well known problem. The answer is
- tell the MRM parser to convert any field that is filled with low-values ( null characters ) into the special value NULL
- In your ESQL, detect the special value NULL and output something that is valid for XML ( a popular option is to set xsi:nil='true'. If you do that then you must also ensure that the XSD declares the element to be nillable using xsi:nillable='true' )

I will leave the first step as an exercise for the reader; just look up 'MRM Null handling' in the Knowledge Center and/or search this forum.
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 » Null character problem
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.