| Author | 
		  Message
		 | 
		
		  | Amit15 | 
		  
		    
			  
				 Posted: Tue Oct 04, 2005 1:56 am    Post subject: HQHRF2 to MQSTR | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Sep 2005 Posts: 24
  
  | 
		  
		    
			  
				Please tell em how can i change message format from HQHRF2 to MQSTR
 
 
thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Nigelg | 
		  
		    
			  
				 Posted: Tue Oct 04, 2005 3:13 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 02 Aug 2004 Posts: 1046
  
  | 
		  
		    
			  
				MQGET the msg in your app.
 
Set MQMD.Format to MQSTR
 
MQPUT the msg back to the queue _________________ MQSeries.net helps those who help themselves.. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Amit15 | 
		  
		    
			  
				 Posted: Tue Oct 04, 2005 3:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Sep 2005 Posts: 24
  
  | 
		  
		    
			  
				Hoq can i set please let me know
 
 
Regards | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dgolding | 
		  
		    
			  
				 Posted: Tue Oct 04, 2005 3:37 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 16 May 2001 Posts: 668 Location: Switzerland 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	| Hoq can i set please let me know  | 
   
 
 
 
strcpy(MQMD.Format, MQFMT_STRING)
 
 
 
1) learn a programming language (C, C++, COBOL, Java)
 
 
2) Read Programmers Application Guide
 
 
3) Edit application program
 
 
4) Compile and link
 
 
   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Tue Oct 04, 2005 9:43 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	MQGET the msg in your app.
 
Set MQMD.Format to MQSTR
 
MQPUT the msg back to the queue | 
   
 
 
Shouldn't there be a step in the middle that removes the RFH2 from the payload.
 
 
Also, that assumes that the data is String.  A safer way would be:
 
Set MQMD.Format from RFH2.Format
 
 
Cheers, _________________ Eddie Atherton
 
IBM Certified Solution Developer - WebSphere Message Broker V6.1
 
IBM Certified Solution Developer - WebSphere Message Broker V7.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Oct 04, 2005 2:02 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				One possibility would be to use a JMSBytesMessage to get the payload, put it to a JMSTextMessage and send it to a destination like:
 
   
	| Code: | 
   
  
	| queue://qmgr/qname?targetClient=1 | 
   
 
 MQ client and not JMS client as that will automatically set it to an MQSTR format and strip the RFH header...
 
 
Enjoy    | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Nigelg | 
		  
		    
			  
				 Posted: Wed Oct 05, 2005 12:59 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 02 Aug 2004 Posts: 1046
  
  | 
		  
		    
			  
				EddieA, maybe there should be a step in the middle, but that is not what Amit15 asked. The question contains no information about the type of the msg at all. _________________ MQSeries.net helps those who help themselves.. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |