Author |
Message
|
bindu |
Posted: Fri May 07, 2004 9:05 am Post subject: BLOB to character ---solved |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi,
I am getting a fixed length string as request message so i need to store that one in a character. Any suggestions.
Thanx,
bindu
Last edited by bindu on Mon May 10, 2004 5:02 am; edited 2 times in total |
|
Back to top |
|
 |
Missam |
Posted: Fri May 07, 2004 9:15 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Quote: |
I am getting a fixed length string as request message so i need to store that one in a character
|
Store where...?
Can u come out with some detail info what exactly u want to do..? |
|
Back to top |
|
 |
bindu |
Posted: Fri May 07, 2004 9:25 am Post subject: BLOB to character |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi,
I want to store that entire string (BLOB) into a character |
|
Back to top |
|
 |
Missam |
Posted: Fri May 07, 2004 9:34 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Yes you can use CAST to store entire BLOB into Character Variable.
Look into ESQL Refernece for Transforming Data from One datatype to another. |
|
Back to top |
|
 |
bindu |
Posted: Fri May 07, 2004 9:37 am Post subject: BLOB to character |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi,
If you have any idea can u help me for that casting.....right now i am trying for that only...but i struck how can i
Thanx,
bindu |
|
Back to top |
|
 |
Missam |
Posted: Fri May 07, 2004 9:44 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Code: |
DECLARE B CHARACTER;
SET B = CAST(InputRoot.BLOB.BLOB As Character CCSID InputRoot.Properties.CodedCharSetId ENCODING InputRoot.Properties.Encoding);
|
from the above code B holds entire input message(BLOB) as Character Data.
The thing i'm intersted to know is after storing entire BLOB into Character Variable,what you want to do with that.
Last edited by Missam on Fri May 07, 2004 9:48 am; edited 1 time in total |
|
Back to top |
|
 |
bindu |
Posted: Fri May 07, 2004 9:46 am Post subject: BLOB to character |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi,
Thanx for ur help.After that i want to substring that entire message and transform to XML file,
Thanx,
Bindu |
|
Back to top |
|
 |
bindu |
Posted: Fri May 07, 2004 9:58 am Post subject: BLOB to character |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi,
I tried by using your code but it goes to failure...I am giving my compute node code below
SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
DECLARE MSG CHARACTER;
SET MSG=CAST(InputRoot.BLOB.BLOB As CHARACTER);
SET OutputRoot.XML."envelope"."message"=MSG;
and also i saw sysntex error
thanx,
bindu |
|
Back to top |
|
 |
Missam |
Posted: Fri May 07, 2004 10:34 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Uncheck the radio button Copy Entire Message.
then try this ESQL
Code: |
SET OutputRoot.Properties.MessageDomain = 'XML';
SET OutputRoot.MQMD = InputRoot.MQMD;
DECLARE MSG CHARACTER;
SET MSG = CAST(InputRoot.BLOB.BLOB As Character);
SET OutputRoot.XML."envelope"."message" = MSG;
|
|
|
Back to top |
|
 |
|