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 » Delimiter of last element which happen to be blank

Post new topic  Reply to topic
 Delimiter of last element which happen to be blank « View previous topic :: View next topic » 
Author Message
KIT_INC
PostPosted: Fri Jun 25, 2010 9:32 am    Post subject: Delimiter of last element which happen to be blank Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

I am creating an All element delimited record for an input xml message
<Root_tag>
<ElementA>A</ElementA>
<ElementB>B</ElementB>
<ElementC>C</ElementC>
</ Root_tag>

The record I output is @A*B*C#
where @ is the group indicator, * is the eleemnt delimiter and # is the group terminator.

But if the last Last Element C contains nothing (i.e. <ElementC></ElementC>) , the ouptut becomes
@A*B#

Another programmer has a program to read my output. He is complaining that C is missing. He expects my output to be
@A*B*#

I did some testing. If B is missing instead of C, I got
@A**C#

So I expect the delimiter for B to show if C is not null. I run the broker trace. the trace shows that C has a value of '' when the input is
<ElementC></ElementC> (i.e. not null).

I have 'Suppress absent element delimiter' already set to 'never'.

Is there anyway that I can get the output ot show @A*B*# ?
Back to top
View user's profile Send private message
Gaya3
PostPosted: Fri Jun 25, 2010 9:37 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

you can create a field after element C and dont populate anything,

this is just a work around. this will help you to get the expected output.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
KIT_INC
PostPosted: Fri Jun 25, 2010 10:31 am    Post subject: Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

Thanks Gaya3, I thought about doing that too. I just want to be sure what I am getting is normal output from the broker and not because of any mis-configuration done by me.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Fri Jun 25, 2010 10:37 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

KIT_INC wrote:
Thanks Gaya3, I thought about doing that too. I just want to be sure what I am getting is normal output from the broker and not because of any mis-configuration done by me.


what you are currently getting is normal, and expected, inorder to change that, you have to create an additional field thats how i have done it
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
KIT_INC
PostPosted: Fri Jun 25, 2010 10:44 am    Post subject: Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

Thanks for the confirmation. I'll add the field
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Jun 26, 2010 12:53 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Gaya3 said:
Quote:
what you are currently getting is normal, and expected, inorder to change that, you have to create an additional field thats how i have done it


Gaya3: Are you sure? If KIT_INC has set 'Suppress absent element delimiters' to 'never' then I reckon the delimiter for the missing C should be output. If not, then I'm not sure what that property is for.
Obviously, your workaround will do the trick, but it shouldn't be required.
Back to top
View user's profile Send private message
KIT_INC
PostPosted: Sat Jun 26, 2010 6:54 pm    Post subject: Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

Thanks Kimbert. I have it working by adding a field as suggested by Gaya3. I am also interested in finding out what does setting 'Suppress absent element delimiter' set to 'never' do for me. But I am not sure how to 'debug' this. A user trace will not tell how the output is build. Will the service trace show this?
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon Jun 28, 2010 5:33 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

kimbert wrote:
Gaya3 said:
Quote:
what you are currently getting is normal, and expected, inorder to change that, you have to create an additional field thats how i have done it


Gaya3: Are you sure? If KIT_INC has set 'Suppress absent element delimiters' to 'never' then I reckon the delimiter for the missing C should be output. If not, then I'm not sure what that property is for.
Obviously, your workaround will do the trick, but it shouldn't be required.


i tested the same on my side too, its working for me, thanks Kimbert...i am trying to recollect the issue that i faced couple of months back regarding the same,

the output i was expecting is like this
a|b|c|
d|e|f|
g||

here i was not getting the pipe delimitter previously, so i made that work around to get the results
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
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 » Delimiter of last element which happen to be blank
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.