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 IndexGeneral IBM MQ SupportProblem with creating subscription having selector by cmd .

Post new topicReply to topic
Problem with creating subscription having selector by cmd . View previous topic :: View next topic
Author Message
mahesh2069
PostPosted: Fri Oct 18, 2013 3:57 am Post subject: Problem with creating subscription having selector by cmd . Reply with quote

Centurion

Joined: 26 Jun 2013
Posts: 103

Hello all,

I want to create one subscription ,and I need to add selector to that subscription, I need to create subscription through command
Following code I used to create subscription.

Code:

runmqsc QM


DEFINE SUB (SUB_TEST) DEST (SUB.TEST) TOPICOBJ (ITEMTEST) SELECTOR ('EMP='123 ' ')



Above command have not give EMP's value in single quote.

I need to create selector emp's value in single quote. But I have n't get it.I mean I have to create selector like
Code:

EMP='123'


But problem with single quote. Please suggest me accepted escaping character in command line.
_________________
Thanks & Regards
Mahesh Mediboyina
WMB Developer
Back to top
View user's profile Send private message
exerk
PostPosted: Fri Oct 18, 2013 5:46 am Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5749

Double-posting the same problem in two different forums, and especially in one that is totally unrelated to your issue, is not going to get you an answer twice as quickly; I have deleted the post in the CLUSTERING forum.

Have you tried the 'normal' escape characters, e.g. \, at all?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.

Back to top
View user's profile Send private message
mahesh2069
PostPosted: Fri Oct 18, 2013 5:52 am Post subject: I tried with '\' ,syntax error is rised. Reply with quote

Centurion

Joined: 26 Jun 2013
Posts: 103

Hello ,

I tried with '\' as escaping character
Code:


DEFINE SUB (SUB_EMP_TEST) DEST (SUB.EMP1) TOPICOBJ (TEST.POC) SELECTOR ('EMP=/'1
23/'')



But i got error like

Code:


AMQ8405: Syntax error detected at or near end of command segment below:-
DEFINE SUB (SUB_EMP_TEST) DEST (SUB.EMP1) TOPICOBJ (TEST.POC) SELECTOR ('EMP=/'1
23/



and also tried with '^' escape character it is also not working .Please help me how to resolve this issue.
_________________
Thanks & Regards
Mahesh Mediboyina
WMB Developer
Back to top
View user's profile Send private message
exerk
PostPosted: Fri Oct 18, 2013 6:06 am Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5749

Have you tried?:
Code:
SELECTOR('EMP='123'')

_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.

Back to top
View user's profile Send private message
mahesh2069
PostPosted: Fri Oct 18, 2013 6:26 am Post subject: It gives error. Reply with quote

Centurion

Joined: 26 Jun 2013
Posts: 103

Hello ,

Yes, I tried but error is coming ,
Code:


    18 : DEFINE SUB (SUB_EMP_TEST) DEST (SUB.EMP1) TOPICOBJ (TEST.POC) SELECTOR
('EMP='123'')
AMQ8405: Syntax error detected at or near end of command segment below:-
DEFINE SUB (SUB_EMP_TEST) DEST (SUB.EMP1) TOPICOBJ (TEST.POC) SELECTOR ('EMP='12
3





So I tested different escaping characters .But have n't get correct escaping character .
_________________
Thanks & Regards
Mahesh Mediboyina
WMB Developer
Back to top
View user's profile Send private message
exerk
PostPosted: Fri Oct 18, 2013 9:15 am Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5749

This is one of those anomalies methinks.

I defined a sub using MQExplorer with the attributes you wanted in the selector and all was good, so I dumped the attributes of the sub using the dmpmqcfg command and it showed:

Code:
SELECTOR ('EMP='123'')


So I'm fresh out of ideas on this one and don't have the time to play around with it an resolve it, sorry.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.

Back to top
View user's profile Send private message
hughson
PostPosted: Fri Oct 18, 2013 9:17 am Post subject: Re: Problem with creating subscription having selector by cm Reply with quote

Shaman

Joined: 09 May 2013
Posts: 728
Location: Bay of Plenty, New Zealand

mahesh2069 wrote:
I need to create selector emp's value in single quote. But I have n't get it.I mean I have to create selector like
Code:

EMP='123'

Might also help if we knew why you had to create the selector in single quotes?

I take it that this doesn't work for some reason?
Code:
DEFINE SUB (SUB_TEST) DEST (SUB.TEST) TOPICOBJ (ITEMTEST) SELECTOR ('EMP="123"')


Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
exerk
PostPosted: Fri Oct 18, 2013 9:23 am Post subject: Re: Problem with creating subscription having selector by cm Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5749

hughson wrote:
Code:
DEFINE SUB (SUB_TEST) DEST (SUB.TEST) TOPICOBJ (ITEMTEST) SELECTOR ('EMP="123"')

Don't you have a home to go to?

I didn't try that myself but it seems odd to me that the output from dmpmqcfg failed because (in theory at least) it should provide clean syntactic output...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.

Back to top
View user's profile Send private message
hughson
PostPosted: Fri Oct 18, 2013 9:34 am Post subject: Re: Problem with creating subscription having selector by cm Reply with quote

Shaman

Joined: 09 May 2013
Posts: 728
Location: Bay of Plenty, New Zealand

exerk wrote:
Don't you have a home to go to?
I am already at home - a WAH day - trouble is deciding when to stop on days like this!

exerk wrote:
it seems odd to me that the output from dmpmqcfg failed because (in theory at least) it should provide clean syntactic output...
I agree - sounds like a defect to me. I will follow up internally.

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
hughson
PostPosted: Tue Oct 22, 2013 2:34 am Post subject: Reply with quote

Shaman

Joined: 09 May 2013
Posts: 728
Location: Bay of Plenty, New Zealand

The other alternative spelling for this is as follows:-

Code:

DEFINE SUB (SUB_TEST) DEST (SUB.TEST) TOPICOBJ (ITEMTEST) SELECTOR ('EMP=''123''')


so for each single quote that you need, you actually put two in. This means you end up with three in a row at the end.

This would be the exact equivalent of what was requested.

Indeed looks like a dmpmqcfg defect as it is not creating this MQSC command correctly.

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
exerk
PostPosted: Tue Oct 22, 2013 2:56 am Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5749

hughson wrote:
The other alternative spelling for this is as follows:-

Code:

DEFINE SUB (SUB_TEST) DEST (SUB.TEST) TOPICOBJ (ITEMTEST) SELECTOR ('EMP=''123''')


so for each single quote that you need, you actually put two in. This means you end up with three in a row at the end.

This would be the exact equivalent of what was requested.

Indeed looks like a dmpmqcfg defect as it is not creating this MQSC command correctly.

Cheers
Morag

Always happy to work as a bug finder...now, back to trying to get Client to work on Tandem.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.

Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportProblem with creating subscription having selector by cmd .
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.