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 » Discard Input Record

Post new topic  Reply to topic Goto page 1, 2  Next
 Discard Input Record « View previous topic :: View next topic » 
Author Message
manan.patel
PostPosted: Tue Oct 09, 2012 4:50 am    Post subject: Discard Input Record Reply with quote

Apprentice

Joined: 01 Oct 2012
Posts: 25

I have used MRM parser for parsing of an input file.

However I have a requirement that based on the content of input, either i will be passing the message to the procedure in my esql file or i will simply discard it.


The problem is like

InputRoot.MRM.SXW_SEGMENT.SXW_STATION.SXW_CURR_CDE = "KM" then i need to discard the whole record before it could be parsed, otherwise it is adding a blank line in my output file which is "CSV".

Experts, please help.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Oct 09, 2012 5:37 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Use the IF keyword in ESQL to selectively process data.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
manan.patel
PostPosted: Tue Oct 09, 2012 5:43 am    Post subject: Reply with quote

Apprentice

Joined: 01 Oct 2012
Posts: 25

Thanks for the reply..

But the thing is not that simple.


Even then after it is adding the blank line in my output file.
Here is my code.


CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();


IF variable = 'KZ' THEN
--do nothing that means, discard the record
ELSE
CALL FunctionToParseInput();
END IF;
RETURN TRUE;
END;




So if there is any otherway?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Oct 09, 2012 5:48 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Use [c o d e ] tags in your forum posts, please.

There are several WMB consultants in the forum. Are you offering work?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Oct 09, 2012 5:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

manan.patel wrote:
So if there is any otherway?


Well you could code it correctly.

If you want to discard any input record with variable = 'KZ' then you should discard it. Doing nothing is not the same as discarding it. All your code does is not parse it; the unparsed (presumably blank output) message is still sent out of the Compute node and into the FileOutput node where it builds this blank line.

Fix your code to actually discard the mesage and not send it onwards.
Hint: what makes the message move?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
aravind703
PostPosted: Tue Oct 09, 2012 5:53 am    Post subject: Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

Try RETURN FALSE
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Oct 09, 2012 5:54 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

aravind703 wrote:
Try RETURN FALSE


You are too easy. You need to make the noobs look up the information. Else, how will they learn?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
aravind703
PostPosted: Tue Oct 09, 2012 5:58 am    Post subject: @ lancelotlinc Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

I am really sorry, i should have understood when my first post was deleted. I was not sure my i was not seeing my post.

So i did post a new one.


I will not post any directly solution from now on
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 09, 2012 6:01 am    Post subject: Re: @ lancelotlinc Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

aravind703 wrote:
I am really sorry, i should have understood when my first post was deleted. I was not sure my i was not seeing my post.

So i did post a new one.


I will not post any directly solution from now on


Don't let him push you around. Maybe we're all cranky people who should be nicer and more directly helpful. Stand up to us, and tell us to be nicer if that's the right thing.

Of course, maybe if you hang around here long enough, you'll become a cranky person who should be nicer and more directly helpful from the overwhelming tide of questions that demonstrate no effort to solve or understand.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Oct 09, 2012 6:14 am    Post subject: Re: @ lancelotlinc Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

mqjeff wrote:
a cranky person who should be nicer and more directly helpful.


Hey, I resemble that remark.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Oct 09, 2012 6:46 am    Post subject: Re: @ lancelotlinc Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

lancelotlinc wrote:
mqjeff wrote:
a cranky person who should be nicer and more directly helpful.


Hey, I resemble that remark.


I resemble it far more, but I do think there's value in giving posters hints rather than just spoon feeding out answers.

Should we be giving more hints and being nicer? Maybe. Should we just accept that a) training is not available to everyone & b) doesn't answer every possible question, just most of the obvious ones? Yes.

Which in no way diminishes the value of formal training, the desireabliity of such training and acceptance that the world is not perfect.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 09, 2012 6:47 am    Post subject: Re: @ lancelotlinc Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Of course, maybe if you hang around here long enough, you'll become a cranky person


I give it 6 months.

mqjeff wrote:
the overwhelming tide of questions that demonstrate no effort to solve or understand.


Which tide seems to be higher lately.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
manan.patel
PostPosted: Tue Oct 09, 2012 7:48 am    Post subject: Reply with quote

Apprentice

Joined: 01 Oct 2012
Posts: 25

aravind703
Quote:
Try RETURN FALSE


Thanks, it worked...
Back to top
View user's profile Send private message
manan.patel
PostPosted: Wed Oct 10, 2012 2:39 am    Post subject: Reply with quote

Apprentice

Joined: 01 Oct 2012
Posts: 25

Jedi Knight wrote
Quote:
You are too easy. You need to make the noobs look up the information. Else, how will they learn?



Sorry, jedy..

But i disagree to you.

It was waste of time if I searched the information library for this silly thing.

Return False is not any technology that i must learn.

Forum is for helping the bugs like this.


And still you disagree than again I am sorry.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Oct 10, 2012 5:02 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

manan.patel wrote:
Jedi Knight wrote
Quote:
You are too easy. You need to make the noobs look up the information. Else, how will they learn?


Forum is for helping the bugs like this.


"Bugs", like Freshers?

Do you mean to say that you choose not to do your own research and discover why your use of the product is not aligned with the design of the product?

RETURN FALSE is one of the most basic syntax elements of ESQL.

Why should someone help you if you won't even do your own homework?

Why should we allow you to copy off our homework assignment?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Discard Input Record
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.