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 » char to BLOB conversion

Post new topic  Reply to topic
 char to BLOB conversion « View previous topic :: View next topic » 
Author Message
satish
PostPosted: Thu Jan 10, 2002 3:22 am    Post subject: Reply with quote

Newbie

Joined: 26 Nov 2001
Posts: 9

Hi all,
I was trying to conver string to BLOB.
the code I am using is

DECLARE Field1 CHAR;
DECLARE Field2 CHAR;
DECLARE Field3 CHAR;

--SET OutputRoot.Properties.MessageDomain = 'BLOB';
--SET OutputRoot.Properties.MessageType = '';
--SET OutputRoot.Properties.MessageFormat = '';
--SET OutputRoot.MQMD.Format = MQFMT_NONE;

SET Field1 = 'ARYGA';
SET Field2 = InputRoot.XML.A.B;

SET Field3 = Field1 || Field2;

SET OutputRoot."BLOB"."BLOB" = Field3;

I tried RCD also, but it gives me this error
BIP2328E: A value of SQL datatype 'CHARACTER' encountered when datatype 'BLOB' expected.
The value of SQL datatype CHARACTER was encountered, but a value of SQL datatype BLOB was expected.

Any help on this regard will be greatly appreciated.

thanks and regards,
satish

_________________
IBM Certified MQSeries Specialist
IBM Certified MQSI Specialist
Back to top
View user's profile Send private message
mpuetz
PostPosted: Thu Jan 10, 2002 10:44 am    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

short answer:
prior to V2.1 there is no easy way to do this.

long answer:
so you don't wan't to upgrade,hmm, let's see

1. Rescue all relevant data in your message
in the Destinationlist.
2. Create a MRM Messagetype with a single null-terminated string element.
3.
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageSet = your-message-set-id;
SET OutputRoot.Properties.MessageType = your-message-identifier;
SET OutputRoot.MessageFormat = 'CWF';

SET OutputRoot.MRM.your-string-field-name = string1 || string2;
4. Add a compute following this one
DECLARE myblob BLOB;

SET myblob = BITSTREAM(InputBody);

and myblob contains what you want.

Messy, but it works.


_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
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 » char to BLOB conversion
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.