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 » CAST BLOB to Char

Post new topic  Reply to topic
 CAST BLOB to Char « View previous topic :: View next topic » 
Author Message
KT
PostPosted: Fri Oct 17, 2003 10:30 am    Post subject: CAST BLOB to Char Reply with quote

Newbie

Joined: 09 Oct 2003
Posts: 7

How can I cast the whole hexidecimal BLOB message to a char string?
Back to top
View user's profile Send private message
kolban
PostPosted: Fri Oct 17, 2003 11:27 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I am not sure if this is possible in ESQL, but if you were to use the JavaScript node (see http://www.kolban.com/mbjavascript/)

Then something like:

Code:

var myBlob = myHelper.getValue(inMessage, "BLOB/BLOB");
var myString = new java.lang.String(myBlob);


would work.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sat Oct 18, 2003 5:57 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm confused Kolban.

Why can't KT just use
Code:
Set myString = Cast (InputRoot.BLOB.BLOB as character CCSID InputRoot.Properties.CodedCharSetId);
KT's probably having the standard problem of not specifing a CCSID to the cast function, so is getting the 'hex' representation of the BLOB bytes as a string, rather than a 'normal' string.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kolban
PostPosted: Sat Oct 18, 2003 1:49 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Sorry guys, I was out of step with the latest happenings. I thought ESQL only converted BLOB to a hex representation and missed that one could now convert to a character set string.

This is by far the better approach. Apologies for the confusion.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » CAST BLOB to Char
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.