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 » Purging a Transaction or Input Message Using Esql ???

Post new topic  Reply to topic
 Purging a Transaction or Input Message Using Esql ??? « View previous topic :: View next topic » 
Author Message
mqmaniac
PostPosted: Wed May 24, 2006 7:23 am    Post subject: Purging a Transaction or Input Message Using Esql ??? Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed May 24, 2006 7:41 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed May 24, 2006 8:07 am    Post subject: Reply with quote

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
View user's profile Send private message
mqmaniac
PostPosted: Wed May 24, 2006 9:29 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed May 24, 2006 9:33 am    Post subject: Reply with quote

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
View user's profile Send private message
mqmaniac
PostPosted: Wed May 24, 2006 9:44 am    Post subject: Reply with quote

Master

Joined: 27 Dec 2005
Posts: 201

It Transformed all the Messages..did not Purge..Msg's with Filed>70000
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 24, 2006 9:50 am    Post subject: Reply with quote

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
View user's profile Send private message
madi
PostPosted: Wed May 24, 2006 10:33 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

can u post ur code? (if statement)

--madi
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 24, 2006 1:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed May 24, 2006 11:40 pm    Post subject: Reply with quote

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
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 » Purging a Transaction or Input Message Using Esql ???
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.