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 » Access MQ Reason Code and Completion Code in exception tree

Post new topic  Reply to topic
 Access MQ Reason Code and Completion Code in exception tree « View previous topic :: View next topic » 
Author Message
scorpio9
PostPosted: Tue May 15, 2012 11:19 am    Post subject: Access MQ Reason Code and Completion Code in exception tree Reply with quote

Newbie

Joined: 15 May 2012
Posts: 5
Location: NJ

Hi,

I have to build a MQ Exception Tree something like below for error handling in ESQL:

WHEN FIELDNAME(RefException) = 'MessageException' THEN

SET ENV.MQE.NUMBER = RefException.Number;
SET ENV.MQE.TEXT = RefException.Text;
SET ENV.MQE.COMPCD = RefException.Insert[1].Text;
SET ENV.MQE.REASONCD = RefException.Insert[3].Text;


My question is...what is the best way to access the MQRC & MQCC from the exception tree whenever I get a MQ exception and build my Exception Tree as above? I observed the position of them varies in the Insert tree based on the BIPMsg number.

Thanks in advance.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue May 15, 2012 11:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ESQL Select?
Back to top
View user's profile Send private message
scorpio9
PostPosted: Tue May 15, 2012 11:48 am    Post subject: Reply with quote

Newbie

Joined: 15 May 2012
Posts: 5
Location: NJ

thank you, but how do I write the Select query when I dont know in which Insert element tree the reason code is returned for each MQ exception?

problem is the reason code can come in Insert[1], Insert[2], Insert[3],...for different MQ exceptions. how can I capture that every time in my code?
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue May 15, 2012 11:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Select the insert that contains the Reason Code.

That is, write a WHERE clause that identifies that a specific insert contains a Reason Code.
Back to top
View user's profile Send private message
scorpio9
PostPosted: Tue May 15, 2012 12:38 pm    Post subject: Reply with quote

Newbie

Joined: 15 May 2012
Posts: 5
Location: NJ

how do I find the Insert that contains a Reason code? the Insert tree doesnt have anything to identify it, all it has is the four digit number(RC). The only way to write a WHERE condition is to look for four digit number which I think is not a good approach.

Also what about the completion code?
Back to top
View user's profile Send private message Send e-mail
scorpio9
PostPosted: Tue May 15, 2012 1:54 pm    Post subject: Reply with quote

Newbie

Joined: 15 May 2012
Posts: 5
Location: NJ

Okay, got what you were talking about. let me try that. thanks!
Back to top
View user's profile Send private message Send e-mail
scorpio9
PostPosted: Thu May 17, 2012 6:17 am    Post subject: Reply with quote

Newbie

Joined: 15 May 2012
Posts: 5
Location: NJ

I have written my select statement something like this to find the reason cd and completion cd...

IF FIELDNAME(PATH) = 'Insert' THEN
MOVE PATH PARENT;
SET ENV.MQE.REASONCD[] = SELECT P.Text FROM PATH.Insert[] AS P WHERE (P.Text) => 2000 AND (P.Text) < 6130;
SET ENV.MQE.COMPCD[] = SELECT P.Text FROM PATH.Insert[] AS P WHERE (P.Text = 1 OR P.Text = -1 OR P.Text = 2) ;
END IF;

It works as long as there is an integer in the Insert.Text and fails when it comes across a char. Is there better way I can find the MQRC & MQCC using a Select query?

The other way I thought of doing this is using a while loop and traverse though each Insert.Text and find if it is an integer, if so, is it => 2000 & <6130 for MQRC. By doing this I am only trying to find any integer in Insert.Text which is between the range of 2000 - 6130...which has a risk that it might not be a MQRC or MQCC.

I want to capture the MQRC & MQCC for anykind of MQ exceptions and map it to my tree. Appreciate any ideas.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Access MQ Reason Code and Completion Code in exception tree
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.