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 » Converting String to BLOB in ESQL

Post new topic  Reply to topic
 Converting String to BLOB in ESQL « View previous topic :: View next topic » 
Author Message
vmurdesh
PostPosted: Tue Aug 06, 2002 11:09 am    Post subject: Converting String to BLOB in ESQL Reply with quote

Novice

Joined: 09 May 2002
Posts: 18

I am trying to convert a string in the Environment tree to a BLOB (without resorting to Hex)

DECLARE myMessage BLOB;
SET myMessage = X'45415F454E' || BITSTREAM(Environment.Variables.ServiceName);

This syntax does not work (and neither does CAST).

Is there another way?

Thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Aug 06, 2002 11:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

What kind of error are you getting? Is it a
1. Syntax error in Control Center
2. Error during deploy of the message flow
3. runtime error?

could you post your ExceptionList here?
_________________
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
vmurdesh
PostPosted: Tue Aug 06, 2002 1:55 pm    Post subject: No deployment or runtime error.. Reply with quote

Novice

Joined: 09 May 2002
Posts: 18

The String value in Environment.Variables.ServiceName is just not a part of the myMessage BLOB.
thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Aug 06, 2002 2:32 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

This is strange ... but I think BITSTREAM function does not work on local variables, Environment and LocalEnvironment trees. It only works on incoming message or the message constructed in the Compute node.

Any idea??
_________________
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
Tibor
PostPosted: Wed Aug 07, 2002 12:31 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

kirani wrote:
This is strange ... but I think BITSTREAM function does not work on local variables, Environment and LocalEnvironment trees. It only works on incoming message or the message constructed in the Compute node.

Any idea??

BITSTREAM won't work in this case because the broker doesn't know about physical layer (XML, CWF, etc).

In contrast: Root.Properties contains this information but Environment hasn't got any similar.
Back to top
View user's profile Send private message
Miriam Kaestner
PostPosted: Wed Aug 07, 2002 4:19 am    Post subject: Reply with quote

Centurion

Joined: 26 Jun 2001
Posts: 103
Location: IBM IT Education Services, Germany

CAST should work:
SET myMessage = X'45415F454E' || CAST(Environment.Variables.ServiceName AS BLOB CCSID OutputRoot.MQMD.CodedCharSetId);
Back to top
View user's profile Send private message Send e-mail
vmurdesh
PostPosted: Wed Aug 07, 2002 8:20 am    Post subject: CAST and BITSTREAM both do not work.. Reply with quote

Novice

Joined: 09 May 2002
Posts: 18

A CAST does not work.. Gives this in the NT Event Log.

An attempt was made to cast the character string 'JacadaFNOL' to a byte string, but the string was of the wrong format. There must be an even number of hexadecimal digits (0-9, a-f, A-F).

The BITSTREAM i think can only be used on the Root Tree. (produces no error but just does not append the variable to the message..)
BITSTREAM(Environment.Variables.ServiceName);

Thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Aug 07, 2002 9:24 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

CAST with CCSID will work in WMQI 2.1 CSD2.
What version of MQSI/WMQI are you using and what CSD level?
_________________
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
vmurdesh
PostPosted: Wed Aug 07, 2002 9:44 am    Post subject: Cool.. With CCSID does work !!! Reply with quote

Novice

Joined: 09 May 2002
Posts: 18

I had thought CCSID is only across platforms.
THANKS!!!!
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 » Converting String to BLOB in ESQL
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.