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 » Bypass CAST exception

Post new topic  Reply to topic
 Bypass CAST exception « View previous topic :: View next topic » 
Author Message
KIT_INC
PostPosted: Tue Oct 23, 2007 11:11 am    Post subject: Bypass CAST exception Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

The very last thing I am asked to do in my message flow is to do a best effort casting of a portion of the message into character and output the result to a queue so that user can read it. It does not matter if the cast works or fails. But the standard broker exception handling (please correct me if I am wrong)is to roll back the message flow when the CAST statement fail. That portion of the message contains data supplied by our external client which we have no control on. It will cause the cast to fail if it contains data that can not be casted into the CCSID specified. I was wondering if there is way to bypass this exception and let the flow complete.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 23, 2007 11:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Well, of course, you can put a Try/Catch before the Compute node that does the catch.

You can also declare a handler.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ak20700_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dkeister
PostPosted: Tue Oct 23, 2007 12:15 pm    Post subject: Reply with quote

Disciple

Joined: 25 Mar 2002
Posts: 184
Location: Purchase, New York

How about wiring the Failure terminal on the compute node doing the CAST, decoding the error and if a CAST failure, put the appropriate message to the output queue?
_________________
Dean Keister
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mgk
PostPosted: Tue Oct 23, 2007 1:33 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

If you are using V6 look up the DEFAULT clause on the CAST statement. This should do what you want, ie avoid the exception if the CAST fails...


Cheer,
_________________
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
KIT_INC
PostPosted: Tue Oct 23, 2007 2:51 pm    Post subject: Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

Thanks mgk. I am using V6. So I will looking into using the default.
Just for my education purpose, I have looked at declareing my own handler. it seems to be more appropriate for situation where there is SQLSTATE or return codes. I have difficulties finding what ESQL state or return code that I'll get when the cast statement fails. Is this documented anywhere ? Did I misunderstand the coding of the handler ?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 23, 2007 4:52 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's not well documented... but from what I understand from other conversations with mgk... you could do something like use the VALUE clause of the declare handler to match a specific BIP number... or just set up a wildcard on the handler to catch *all* ESQL exceptions.
_________________
I am *not* the model of the modern major general.
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 » Bypass CAST exception
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.