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 » Using Content Based Filtering for Publications (v2.1)

Post new topic  Reply to topic
 Using Content Based Filtering for Publications (v2.1) « View previous topic :: View next topic » 
Author Message
ayanc
PostPosted: Mon Dec 20, 2004 4:10 am    Post subject: Using Content Based Filtering for Publications (v2.1) Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi All,

I am trying to use content based filtering for selecting specific publications, in WMQI 2.1 (CSD 07).

In the subscription node, I have written the following code:

SET OutputRoot.MQMD.Format = 'MQHRF2';
SET OutputRoot.MQRFH2.psc.Command = 'RegSub';
SET OutputRoot.MQRFH2.psc.Topic = 'Science';
SET OutputRoot.MQRFH2.psc.QName = 'SUBSCRIBER.QUEUE';
SET OutputRoot.MQRFH2.psc.Filter = "InputBody"."Book"."Title" LIKE 'N%';
SET OutputRoot.MRM = InputBody;

The message structure is as follows:

<?xml version="1.0" ?>
<Lib>
<Book>
<Title>Cosmos</Title>
<Author>Carl Sagan</Author>
<Published>2004-12-18 11:25:00</Published>
</Book>
</Lib>


My Objective is to allow all those messages whose Published date field is within two days ahead from current date.

But for experimenting the filter condition, I tried to allow all those messages whose names start with the letter 'N' (say).

The problem is, it sends all the messages to the subscription queue. In other words the filter condition is not working properly.

The pdf files indicate the use of the following example:
Body.Name LIKE 'C%'

But when I use "Body"."Book"."Title" LIKE 'N%' then it doesnt deploy and gives me a error stating that correlation name "Body" is not valid.

Can anyone help?

Thanks.
Ayan.
Back to top
View user's profile Send private message
ayanc
PostPosted: Mon Dec 20, 2004 10:30 pm    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi,


I have found out a solution to filter all Title values starting with the character 'N', and it is working. Now I will try to use the date fields.

Thanks.
Back to top
View user's profile Send private message
ayanc
PostPosted: Wed Dec 22, 2004 3:50 am    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi All,

I failed implementing filter condition using date fields. Actually I have not been able to find out how to use variables as part of filter condition.

I have tried two types of solutions:

Case1:

SET OutputRoot.MQRFH2.psc.Filter = 'CAST(SUBSTRING(TRIM(Body.Book.Published) FROM 1 FOR 10) AS DATE) <= (CURRENT_DATE + INTERVAL ''2'' DAY)';

Case2:

SET PUBDT = CAST(SUBSTRING(TRIM("InputBody"."Book"."Published") FROM 1 FOR 10) AS DATE) ;
SET REFDT = CURRENT_DATE + INTERVAL '2' DAY;
. .. ..
.. .. ..

SET OutputRoot.MQRFH2.psc.Filter = 'PUBDT <= REFDT';


But in both the cases, I observed there was no error reported. The trace files are also clean.

In Case1:

No subscription is registered and nothing works.

In Case2:

A subscription is registered with content filter as PUBDT <= REFDT, but again it doesnt work.

Can any body bail me out?

I wonder if it is possible to use variables in filter conditions.


Thanks.
Ayan.
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Mon Nov 28, 2005 3:20 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

i dint even get past your first step, i would appriciate it if you could take the time to explain what got your first step working.

thanks.
Back to top
View user's profile Send private message Yahoo Messenger
EddieA
PostPosted: Mon Nov 28, 2005 3:51 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
Posted: 22 Dec 2004 11:50

I hope they're not still waiting for a reply.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Tue Nov 29, 2005 8:27 am    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

maybe i was a little too optimistic, thought i'll get an answer if the person was a frequent visitor. guess not.
Back to top
View user's profile Send private message Yahoo Messenger
EddieA
PostPosted: Tue Nov 29, 2005 11:11 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Perhaps if you actually descibed your problem, in detail, together with what you've already tried, we might be able to help.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » Using Content Based Filtering for Publications (v2.1)
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.