| Author | 
		  Message
		 | 
		
		  | JosephGramig | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 10:34 am    Post subject: Trigger Process fails if I add ' &' to put it in backgro | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA 
  | 
		  
		    
			  
				OS is HPUX
 
WMQ 6.0.2.2
 
 
   
	| Code: | 
   
  
	
 
trigger process def is like:
 
   PROCESS(someProc)          APPLTYPE(UNIX)
 
   APPLICID('/usr/local/bin/sudo -u someid /somedir/sh/some.sh param1 &')
 
   ENVRDATA( )                             USERDATA( )
 
 | 
   
 
 
 
it fails. If I remove the ' &', works. I want to run this in the background. The same command seems to work from the command line.
 
 
I'm wondering why it fails.
 
 
MQFB_APPL_CANNOT_BE_STARTED | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 10:48 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				Look at the error logs. _________________ I like deadlines. I like to wave as they pass by.
 
ב''ה
 
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JosephGramig | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 11:49 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA 
  | 
		  
		    
			  
				Nothing of interest or related in either the main error logs or the ones that go with the QMGR.
 
 
Off line, a friend was suggesting that the & was not the last param on the command line because of the way runmqtrm constructs the command.
 
 
I'm going to try to put the & in USRDATA. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 11:59 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				A Google search for MQFB_APPL_CANNOT_BE_STARTED will provide a variety of things to look for.
 
 
Add this to the process definition:  ENVRDATA(‘ &’).  Inside the parentheses: apostrophe space ampersand apostrophe. _________________ I like deadlines. I like to wave as they pass by.
 
ב''ה
 
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 8:04 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				Bruce is right. The & should be in envrdata. Can't remember if we had quotes around it or not. Shouldn't make much difference because upper case & is still &...
 
 
Have fun   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Fri Aug 28, 2009 5:15 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				If memory serves (?), you need the unix command, a space, then the ampersand. _________________ I like deadlines. I like to wave as they pass by.
 
ב''ה
 
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JosephGramig | 
		  
		    
			  
				 Posted: Fri Aug 28, 2009 9:26 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |