| Author | 
		  Message
		 | 
		
		  | mahesh2069 | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 3:57 am    Post subject: Problem with creating subscription having selector by cmd . | 
				     | 
			   
			 
		   | 
		
		
		   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
 
 
 
 
But problem with single quote. Please suggest me accepted escaping character in command line. _________________ Thanks & Regards
 
Mahesh Mediboyina
 
WMB Developer | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | exerk | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 5:46 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 02 Nov 2006 Posts: 6339
  
  | 
		  
		    
			  
				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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mahesh2069 | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 5:52 am    Post subject: I tried with '\' ,syntax error is rised. | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | exerk | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 6:06 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 02 Nov 2006 Posts: 6339
  
  | 
		  
		    
			  
				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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mahesh2069 | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 6:26 am    Post subject: It gives error. | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | exerk | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 9:15 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 02 Nov 2006 Posts: 6339
  
  | 
		  
		    
			  
				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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | hughson | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 9:17 am    Post subject: Re: Problem with creating subscription having selector by cm | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 09 May 2013 Posts: 1967 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
 
 
 | 
   
 
 
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
 
Get your IBM MQ training here!
 
MQGem Software | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | exerk | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 9:23 am    Post subject: Re: Problem with creating subscription having selector by cm | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 02 Nov 2006 Posts: 6339
  
  | 
		  
		    
			  
				
   
	| 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | hughson | 
		  
		    
			  
				 Posted: Fri Oct 18, 2013 9:34 am    Post subject: Re: Problem with creating subscription having selector by cm | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 09 May 2013 Posts: 1967 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
 
Get your IBM MQ training here!
 
MQGem Software | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | hughson | 
		  
		    
			  
				 Posted: Tue Oct 22, 2013 2:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 09 May 2013 Posts: 1967 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
 
Get your IBM MQ training here!
 
MQGem Software | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | exerk | 
		  
		    
			  
				 Posted: Tue Oct 22, 2013 2:56 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 02 Nov 2006 Posts: 6339
  
  | 
		  
		    
			  
				
   
	| 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |