Posted: Wed Jan 14, 2009 9:01 am Post subject: mb 6.1 basics
Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
I have 2 basic Qs for MB6.1:
1. MQoutput Node: How can I capture and determine "Failure->" the MQ staus/code/reason in esql (compute node after the MQoutput)?
2. Route Node: What is the syntax to route on substring of Env Var element (careate in previouse compute node)?
It should be something like:
substring($LocalEnvironment/Variables/ID, 1, 3) = '123')
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
IN an answer to your first question.
If an MQOutput Node encounters an error when writing a message (eg Put INhibited) an exception will be caused. The flow will roll back as normal to a point where the exception can be thrown.
This is normally a Try-Catch node of the node that started the flow.
So using a TryCatch Node
If something is wired to the Catch Terminal then the exception will be thrown and an exception list will be generated.
You can navigate the exceptionlist with some ESQL and extract the Failure code generated by WMQ, the object in question.
At the risk of repeating a general trend to replies recently.
Put a Trace node on the ExceptionList. This was you will see the structure and you can generate some ESQL to extract the data.
There was some ESQL posted here some years ago that demonstrated how to do this. I use a variant of this in many of the flows I write to do just this type of operation. _________________ 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.
Posted: Wed Jan 14, 2009 2:43 pm Post subject: Re: mb 6.1 basics
Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
[quote="scravr"]Thanks for the reply.
Tracing and Excp List.... I know; just thought someone can make it simp
er.
Whats aboyt Q #2 ?[/quote]
I someone was to put the whole ESQL needed to do this how would you learn? As I said, there is some ESQL on this forum. I used this as the basis for my code but it was modifed quite extensively for my purposes (eg. I have separate bits for DB & WMQ Errors plus some general code for other exceptions. These are tied into code in the flows like not autromaicallty throwing an exception in a coimpute node as a result of a DB error so I capture some extra information before throwing the exception manually)
If I remember correctly there was also an IBM redbook or some other document which described Broker Exception Handling in all its gory detail. _________________ 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.
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