| Author | 
		  Message
		 | 
		
		  | nik_iway | 
		  
		    
			  
				 Posted: Sun Apr 16, 2006 10:15 pm    Post subject: Message ID | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 21 Jul 2005 Posts: 115
  
  | 
		  
		    
			  
				Hi,
 
       I have a Requirement where i need to pick up the message from the Queue based on the Message ID stored in the Database. Can i copy the Message ID Stored in the Database  to MQMD MsgId and in MQGET , specifying MQMO_MATCH_MSG_ID...
 
 
Thanking you
 
Regards
 
Nik | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Sun Apr 16, 2006 10:20 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				Yes.
 
 
On Z/OS you can also index the queue by MSGID for a performance gain. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | HubertKleinmanns | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 12:12 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Shaman
 
 Joined: 24 Feb 2004 Posts: 732 Location: Germany 
  | 
		  
		    
			  
				But remember, the msg id is a bit stream and not in human readable format. _________________ Regards
 
Hubert | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Leigh Kendall | 
		  
		    
			  
				 Posted: Mon Apr 24, 2006 11:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 10 Apr 2003 Posts: 66 Location: Hartford, CT 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | nik_iway | 
		  
		    
			  
				 Posted: Mon Apr 24, 2006 10:56 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 21 Jul 2005 Posts: 115
  
  | 
		  
		    
			  
				Hi,
 
     I have an ILE RPG PROGRAM that reads the Message (Basicaaly the MEssage ID ) and Store it in the Data base, Another ILE program will pick up the data (Message ID) and look for the MEssahe in the Queue for the Specific Message Id. 
 
 
Wat r the steps needed to be done.
 
 
In Windows When i am browsing Message using MQExplorer the following is shown as the MEssage ID
 
 
AMQ QA.TEST.D{¶LD
 
 
414D512051412E534B414E4449412E447BB64C4420000F01
 
 
which one is the MessageID | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fschofer | 
		  
		    
			  
				 Posted: Mon Apr 24, 2006 11:20 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany 
  | 
		  
		    
			  
				Hi,
 
 
both, the first one is the MessageID translated to readable ASCII characters (some at least).
 
 
The second one is the original hex string which is stored within the MQMD.
 
 
   
	| Quote: | 
   
  
	AMQ QA.TEST.D{¶LD 
 
 
414D512051412E534B414E4449412E447BB64C4420000F01  | 
   
 
 
 
41 => A
 
4D => M
 
 
for more look here
 
http://en.wikipedia.org/wiki/Ascii#ASCII_printable_characters
 
 
Greetings
 
Frank | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | nik_iway | 
		  
		    
			  
				 Posted: Mon Apr 24, 2006 11:33 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 21 Jul 2005 Posts: 115
  
  | 
		  
		    
			  
				Hi fschofer 
 
 
         thanks you for the reply. I can use 
 
 
414D512051412E534B414E4449412E447BB64C4420000F01
 
 
Message id  to store in the database and using this value can i retrive the MEssage from the Queue with the Same Message id
 
 
 
Regards
 
Nik | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Apr 25, 2006 3:12 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				
   
	| nik_iway wrote: | 
   
  
	Hi fschofer 
 
 
         thanks you for the reply. I can use 
 
 
414D512051412E534B414E4449412E447BB64C4420000F01
 
 
Message id  to store in the database and using this value can i retrive the MEssage from the Queue with the Same Message id
 
 
 
Regards
 
Nik | 
   
 
 
No. Before you retrieve the message you need to transform this String into a byte array with the values as specified by the hex string:
 
1st byte value 0x41
 
.....
 
3rd last byte value 0x00 (c string terminator)...
 
2nd last byte value 0x0F
 
last byte value 0x01
 
 
Enjoy    _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | maneshgurav | 
		  
		    
			  
				 Posted: Mon May 01, 2006 2:14 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Apr 2006 Posts: 12
  
  | 
		  
		    
			  
				nik_iway, I have a similar requirement. Are you getting the MessageId in HexString using the method suggested by Leigh Kendall? How are you converting the HexString back to Byte array while retrieving the response?
 
 
Thank you,
 
Manesh | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | maneshgurav | 
		  
		    
			  
				 Posted: Fri May 05, 2006 9:04 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Apr 2006 Posts: 12
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |