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 » INSERT ExceptionList

Post new topic  Reply to topic
 INSERT ExceptionList « View previous topic :: View next topic » 
Author Message
cvag
PostPosted: Fri Feb 25, 2011 3:30 am    Post subject: INSERT ExceptionList Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Hi,
I have a requirement for exception handling flow, where i need to parse the exceptionlist tree and need to insert the details (for eg: label, flow name, text etc )in the table. And also, need to put the whole exceptiontree in one column.
Converted the whole exceptionlist tree into BLOB and ASBITSTREAM functions.

Declare Exp REFERENCE TO InputExceptionList.*[];
SET ExpValue BLOB;
SET ExpValue = CAST(ASBITSTREAM(Exp AS BLOB);
Then did the insert 'ExpValue' into the table having column name 'EXCEPTIONLIST' with BLOB Datatype.

But i found the column 'EXCEPTIONLIST'' value is just 'COM.ibm.DB2.@26578a12'
Can you please tell what does it mean? if anydoby has got this type.

I tried exporting the column into a flat file to find the details, but found nothing as it is BLOB format.

Does this value [COM.ibm.DB2.@26578a12] has the meaning of whole exceptionlist


Can you please suggest the other ways, how can i insert and get the ExceptionList (readable XML format) from the table?

1) Should write JDBC connectivity and get the column values and cast it from BLOB to CLOB or Character?


Please suggest.



Thanks in Advance.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Feb 25, 2011 5:07 am    Post subject: Reply with quote

Jedi Council

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

I'm confused
Quote:

the exceptionlist tree and need to insert the details


then
Quote:

get the ExceptionList (readable XML format) from the table


What is is to be? Insert or get or BOTH?

you don't say which version of broker this is targetted at. If you are on V7 then there will be a slightly different answer.
There are dozens (At least) of posts here that cover the use of ASBITSTREAM.
Please take a look at some of them. That will help you in your quest to get that part right.

For a V7.0.0.1 or later take a look at the ESQL functions that do BASE64 encode/decode. These can be used with a CLOB column type to hold the original message and/or the exceptionList in a recoverable form.

Also the Exception list is already parsed. Perhaps you mean 'traverse the folder objects and extract the relevant details to uniquely identify the fault'?

There was a post here within the last few days that asked very much the same thing. Take a look at it. There were some links given to a possible solution.
_________________
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
cvag
PostPosted: Fri Feb 25, 2011 5:40 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Thanks davies for your response,

Quote:
I'm confused
I'm saying "inserting the whole exceptionlist tree into a column"

Quote:
What is is to be? Insert or get or BOTH?

I want both, because i would like to know whether the whole tree has been dumped into column or not.

Quote:
you don't say which version of broker this is targetted at

Having Broker v6.1.0.3

So am thinking of this way
Quote:
Should write JDBC connectivity and get the column values and cast it from BLOB to CLOB or Character?

Readable ExceptionList XML format

OR

Getting the column value from DB, storing in shared variable and CASTING again to CHARACTER.

Could you please correct if my approach is wrong and suggest any better way.




Thanks.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Feb 25, 2011 6:09 am    Post subject: Reply with quote

Jedi Council

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

Ok, you want both and you are using 6.1.0.3 (Time to upgrade methinks...)

Yes you can do what you want.

You need to get your casting to BLOB right
As I said, there are numberous examples of doing this in this forum.
_________________
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
mgk
PostPosted: Fri Feb 25, 2011 6:27 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi.

Quote:
And also, need to put the whole exceptiontree in one column


The ExceptionList tree is not associated with a parser that has a serialised form so you cannot ASBITSTREAM it to get a BLOB of the whole tree. There are a couple of ways I can think of that you can do this though.

The first is to walk the tree in a recursive tree walk function (examples elsewhere on this forum) and build up a CHARACTER string as you go which you CAST to BLOB at the end after walking the whole tree. The you can put this in the DB.

The second is copy the whole exception list to a parser that can serialise, such as XMLNSC and see if it will serialise it for you. For example (not tested):

Code:
CREATE LASTCHILD OF Envrionment.Variables.Test DOMAIN 'XMLNSC' Name 'MyExceptionList';

SET Envrionment.Variables.Test.MyExceptionList = InputExceptionList;


Then you can try to ASBISTREAM the copied ExceptionList. However, I have not tried this and cannot guarantee it will work for all exceptions, as it is possible some of the element names used could not be serialisable to XML (e.g. if an element starts with a number). But you could try this and see if it works for you...

Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
cvag
PostPosted: Mon Feb 28, 2011 12:18 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Thanks mgk for your grt help,

Yes, without parser to serialise the message using ASBITSTREAM is not working.
So i tried like this way
Generated OutputRoot msg to Queue and inserted also to Database.
Applied ASBITSTREAM function CCSID and Encoding.
Finally got inserted whole exceptionList into Database.

Back to top
View user's profile Send private message
mqxplorer
PostPosted: Tue Nov 12, 2013 7:39 pm    Post subject: Reply with quote

Master

Joined: 22 Jun 2009
Posts: 206

cvag wrote:
Thanks mgk for your grt help,

Yes, without parser to serialise the message using ASBITSTREAM is not working.
So i tried like this way
Generated OutputRoot msg to Queue and inserted also to Database.
Applied ASBITSTREAM function CCSID and Encoding.
Finally got inserted whole exceptionList into Database.



If you don't mind, could you post your code here? I am facing some difficulties in achieving what you have done...

Thanks
mqxplorer
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Nov 12, 2013 11: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.

the poster 'cvag' is not a regular poster here. This thread is also several years old. Don't be surprised if you get no response.

So....

Why not do the right thing and open a new post. By all means refer to this one and show us what you have done and importantly tell us what errors you are receiving

don't forget to tell us what platform and broker version you are using.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » INSERT ExceptionList
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.