ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Convert character to blob

Post new topic  Reply to topic
 Convert character to blob « View previous topic :: View next topic » 
Author Message
sat_in_field
PostPosted: Fri Feb 28, 2003 1:32 am    Post subject: Convert character to blob Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Fri Feb 28, 2003 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sat_in_field
PostPosted: Fri Feb 28, 2003 8:08 am    Post subject: Convert character to blob Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Fri Feb 28, 2003 8:57 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Convert character to blob
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.