|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|   |  |  
  
	| set MsgId as file name | View previous topic :: View next topic |  
  	| 
		
		
		  | Author | Message |  
		  | sangminli | 
			  
				|  Posted: Tue Aug 31, 2010 12:29 am Post subject: set MsgId as file name |   |  |  
		  |  Voyager
 
 
 Joined: 26 Aug 2008Posts: 75
 Location: Hangzhou, China
 
 | 
			  
				| I have a requirement here that I need to set the MsgId as the file name. but you know MsgId is BLOB. So how can I extract MsgId as chars?
 |  |  
		  | Back to top |  |  
		  |  |  
		  | kimbert | 
			  
				|  Posted: Tue Aug 31, 2010 1:05 am Post subject: |   |  |  
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 |  |  
		  | Back to top |  |  
		  |  |  
		  | sangminli | 
			  
				|  Posted: Tue Aug 31, 2010 1:18 am Post subject: |   |  |  
		  |  Voyager
 
 
 Joined: 26 Aug 2008Posts: 75
 Location: Hangzhou, China
 
 | 
			  
				| 
   
	| kimbert wrote: |  
	| Use the CAST function. |  i tried to use CAST, but it doesn't work well.
 Say, if i want to use a msg whose MsgId is '414d5120424d534744345132202020204c59c2cd20c66a02', if I CAST it, the result is like 'AMQ BMSGD4Q2    LYÂÍ Æj', which is really not I want. What I want is a string '414d5120424d534744345132202020204c59c2cd20c66a02'.
 
 so if i use CAST, which CCSID and Encoding should i use to keep the BLOB MsgId stay the same after the CAST?
 |  |  
		  | Back to top |  |  
		  |  |  
		  | sangminli | 
			  
				|  Posted: Tue Aug 31, 2010 3:05 am Post subject: |   |  |  
		  |  Voyager
 
 
 Joined: 26 Aug 2008Posts: 75
 Location: Hangzhou, China
 
 |  |  
		  | Back to top |  |  
		  |  |  
		  | mqjeff | 
			  
				|  Posted: Tue Aug 31, 2010 3:08 am Post subject: |   |  |  
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| 
   
	| sangminli wrote: |  
	| I just searched this forum and got a solution to my issue, |  
   
 
   
	| sangminli wrote: |  
	| so you can just CAST the BLOB to CHAR by not specifying CCSID or ENCODING. |  
  |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|   |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | 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
 
 |  |  |  |