Author |
Message
|
mqmaniac |
Posted: Wed May 24, 2006 7:23 am Post subject: Purging a Transaction or Input Message Using Esql ??? |
|
|
 Master
Joined: 27 Dec 2005 Posts: 201
|
Hello Guru's,
I am using WMQI 2.1 CSD 9.
I have a Requirement where If The Value of a Particular Field in a Copybook is >70,000 then The Transaction or Input Message should be Purged,Else Transform It to XML Message.
The Flow has...
RCD(CopyBook)--->Compute Node(Cobol-XML)--->OutputNode
I have Coded this in Esql in the Compute Node above.But,There are Messages generated from the Compute Node and sent to
DEADLETTER QUEUE,For all the Incoming Messages which has the Field >70,000.
But,My Requirement is to PURGE the INCOMING MESSAGE WITHOUT ANY TRACE OF IT.
Is there any Statement in Esql which does this?
Or
Should I code the Esql in Any other Node?
Please Suggest..I am Confused! |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 24, 2006 7:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Hi,
As a fellow user of 2.1 CSD 9 - Upgrade! It's horrible!! I yearn for V6.0
The simplest solution is to send the message to oblivion by routing it to an unconnected node e.g a Filter node with the "Field > 70,000" condition in it and the false node unconnected.
If you want something a bit more positive that looks less like you've just forgotten to wire up the connection, route it to a compute node that has both the "Copy headers" and "Copy entire message" unchecked and no ESQL.
Both work a treat - I have two flows at the moment using the 2nd method to kill messages  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 24, 2006 8:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Or just code an IF statement in ESQL, and if the condition is true then RETURN FALSE; _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mqmaniac |
Posted: Wed May 24, 2006 9:29 am Post subject: |
|
|
 Master
Joined: 27 Dec 2005 Posts: 201
|
Vitor,
I have used the Label node and compute NODE It worked fine.
It purged the Messages.
Thanks for the Reply.
jefflowrey,
I thot It would be simple to have If statement...with RETURN FALSE.
It did not work.
I have used the following format,
If (Field < 70000) then
Transform ESql code;
Else
RETURN FALSE;
END IF;
Is this the Correct Way to Use?
I am just planning to Implement It As simple as possible so trying out Everything.Vitor's Suggestion Increased the No. Of Nodes in the Flow... so trying Return satetements....
Please Help... |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 24, 2006 9:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That should be correct, yes.
What does it do? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mqmaniac |
Posted: Wed May 24, 2006 9:44 am Post subject: |
|
|
 Master
Joined: 27 Dec 2005 Posts: 201
|
It Transformed all the Messages..did not Purge..Msg's with Filed>70000 |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 24, 2006 9:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Then your IF clause is not correct. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
madi |
Posted: Wed May 24, 2006 10:33 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
can u post ur code? (if statement)
--madi |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 24, 2006 1:56 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
As I said, if you are always performing the transformation, it is because the condition you put in your IF clause is always evaluating to TRUE. If that is not what you are expecting for a particular value, then you need to do some DEBUGGING to determine what is actually being evaluated and why it is coming out TRUE.
The User Trace is a reasonable way to do this. I believe the v2.1 documentation has specific steps for enabling, running, and understanding the results of user trace. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 24, 2006 11:40 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqmaniac wrote: |
Vitor's Suggestion Increased the No. Of Nodes in the Flow... so trying Return satetements....
|
Oddly, that's seen as one of the benefits here. They like the idea of a Compute node, seeing it as a way of clearly documenting that the message is off to oblivion. Personally I think they just like a node called "Kill_Message"...
I work for interesting people (hell, they think 2.1.9's cool!)  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|