|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
char to BLOB conversion |
« View previous topic :: View next topic » |
Author |
Message
|
satish |
Posted: Thu Jan 10, 2002 3:22 am Post subject: |
|
|
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 |
|
 |
mpuetz |
Posted: Thu Jan 10, 2002 10:44 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|