|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Convert character to blob |
« View previous topic :: View next topic » |
Author |
Message
|
sat_in_field |
Posted: Fri Feb 28, 2003 1:32 am Post subject: Convert character to blob |
|
|
Novice
Joined: 23 Jan 2003 Posts: 20
|
Hello,
I need to convert a character field to its blob representation. CAST and BITSTREAM are not appropriate for me here, I have an XML tag containing say '123' which I would lke to convert directly to its blob representation. Is this possible? |
|
Back to top |
|
 |
kirani |
Posted: Fri Feb 28, 2003 7:55 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
So you want to display '123' as X'414243'? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
sat_in_field |
Posted: Fri Feb 28, 2003 8:08 am Post subject: Convert character to blob |
|
|
Novice
Joined: 23 Jan 2003 Posts: 20
|
Kiran,
You are correct. The situation is that I have a batch of messages beinhg sent by an external client in XML format. I need to set the correlation ID of each message with the value of a tag in the XML recieved. The recieved data is 'character' format and the MQMD CorrelId has to be in 'blob'.
Thanks in advance
Steve |
|
Back to top |
|
 |
kirani |
Posted: Fri Feb 28, 2003 8:57 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Steve,
In that case you need to first create a 24 byte string and then convert it to BLOB. You can do this using following code,
Code: |
-- Create a 24 byte char string
DECLARE CORREL_ID CHAR;
SET CORREL_ID = InputRoot.XML.IDTag || ' ';
SET OutputRoot.MQMD.CorrelId = CAST (CORREL_ID AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
|
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
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
|
|
|
|