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 » Message Broker Extracting tree as CHAR

Post new topic  Reply to topic
 Message Broker Extracting tree as CHAR « View previous topic :: View next topic » 
Author Message
kakkarj
PostPosted: Mon Aug 03, 2009 2:00 pm    Post subject: Message Broker Extracting tree as CHAR Reply with quote

Novice

Joined: 03 Aug 2009
Posts: 10

Hi All,

I have a requirement to extract the InputRoot.XMLNSC.ExceptionList as CHAR and save the exception message as CLOB value in the database.

Could you please let me know ways to retrieve the InputRoot.XMLNSC.ExceptionList into CHAR?

Appreciate your help and support.

Regards
JK
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Aug 03, 2009 2:14 pm    Post subject: Re: Message Broker Extracting tree as CHAR Reply with quote

Grand High Poobah

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

kakkarj wrote:
Could you please let me know ways to retrieve the InputRoot.XMLNSC.ExceptionList into CHAR?


What have you tried that hasn't worked?

What leads you to believe the ExceptionList is part of the XMLNSC domain?

What does the InfoCentre have to say about accessing the ExceptionList?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Aug 03, 2009 9:12 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.

A very similar question was asked not that long ago.
Did you search this forum for help?
As Vitor has said the Info Centre has a lot of information about ptocessing the ExceptionList
_________________
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
marko.pitkanen
PostPosted: Tue Aug 04, 2009 12:18 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

If you have to create string(cdata or char) or blob representation from message tree try to use ASBITSTREAM and CAST functions.

Marko
Back to top
View user's profile Send private message Visit poster's website
kakkarj
PostPosted: Tue Aug 04, 2009 2:09 am    Post subject: Reply with quote

Novice

Joined: 03 Aug 2009
Posts: 10

Thanks for your response. I tried using the following code but I am able to create a character string

SET exceptionBlob = ASBITSTREAM(InputRoot.ExceptionList
ENCODING InputRoot.MQMD.Encoding
CCSID 1208);
SET exceptionChar = CAST(exceptionBlob AS CHAR CCSID 1208);

Any help will be appreciated.
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Tue Aug 04, 2009 2:23 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

In our first message you mentioned that you have ExceptionList elemen in path InputRoot.XMLNSC.ExceptionList.

Check out what is the right place refer to.

Marko

PS. If you are interested about exception occured in the flow just processing there is own ExceptionList tree for you (not under InputRoot).
Back to top
View user's profile Send private message Visit poster's website
WMBDEV1
PostPosted: Tue Aug 04, 2009 2:32 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

kakkarj wrote:
Thanks for your response. I tried using the following code but I am able to create a character string

SET exceptionBlob = ASBITSTREAM(InputRoot.ExceptionList
ENCODING InputRoot.MQMD.Encoding
CCSID 1208);
SET exceptionChar = CAST(exceptionBlob AS CHAR CCSID 1208);

Any help will be appreciated.


As smdavies says this question has been asked recently and an answer was provided by kimbert. I suggest you look for this thread for your answer.

As a quick summary, this is caused because the ExceptionList does not have a root parser asscoiated with it and so it cannot be serialised as you expect. To resolve this, copy the tree to a variable in the environment whose domain is XMLNSC.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Tue Aug 04, 2009 2:52 am    Post subject: Re: Message Broker Extracting tree as CHAR Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

kakkarj wrote:
Thanks for your response. I tried using the following code but I am able to create a character string

"am", or "am not"? If the former, then problem solved ...

kakkarj wrote:
Code:
SET exceptionBlob = ASBITSTREAM(InputRoot.ExceptionList
    ENCODING InputRoot.MQMD.Encoding CCSID 1208);
SET exceptionChar = CAST(exceptionBlob AS CHAR CCSID 1208);

"InputRoot.ExceptionList", or "InputRoot.XMLNSC.ExceptionList"?

How is this tree populated? The broker doesn't do that; the message flow would have to.

Assuming the intent is to copy the tree from ExceptionList to Root.XMLNSC.ExceptionList, it might be helpful to start with something like:
Code:
SET OutputRoot.XMLNSC.ExceptionList = InputExceptionList;

Though it's possible the XMLNSC parser doesn't handle non-character data so well; in that case, a compute node can recursively copy the elements over one by one, CASTing non-character fields to character fields as needed.

Once that's done, the above code might work better.

Environment.XMLNSC.ExceptionList might work out better, in case Root is needed for something else.

Consult the broker documentation, or the toolkit help, for sample code.
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 » Message Broker Extracting tree as CHAR
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.