Author |
Message
|
Bravo |
Posted: Wed Nov 16, 2005 4:18 pm Post subject: Filter with BLOB |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Hi Guys,
All I am trying to achive to validate certain character in Filter node to proceed further.
The input message is BLOB and I need to find a certain charaters like 'TEST' in specific position.I looked into the link..
http://www.mqseries.net/phpBB2/viewtopic.php?t=14067&highlight=filter
But its seems not working for me.It always returns false.I have tried in both ways.We are using WBIMB 5.
Any Help. _________________ Bravo |
|
Back to top |
|
 |
JT |
Posted: Wed Nov 16, 2005 4:36 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
When asking for assistance it's always best to post the code you've tried. That makes it easier for everyone to gain a better understanding of what you're trying to achieve. |
|
Back to top |
|
 |
Bravo |
Posted: Wed Nov 16, 2005 10:26 pm Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Thanks for your response.This is my code.
Code: |
if SUBSTRING(CAST(Body.BLOB.BLOB AS CHAR CCSID 437) FROM 1 FOR 1) = 'T' then
return true;
else
return false;
end if;
|
Any suggestions. _________________ Bravo |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Nov 16, 2005 10:45 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
If you went through the entire post, the link to which u yourself provided, then you would have tried
Code: |
if SUBSTRING(CAST(Root.BLOB.BLOB AS CHAR CCSID Root.MQMD.CodedCharSetId) FROM 1 FOR 1) = 'T' |
Incase the above dosent work, try to do these first and tell us what each returns
Code: |
DECLARE Casted CHAR;
DECLARE Substringed CHAR;
SET Casted = CAST(Root.BLOB.BLOB AS CHAR CCSID Root.MQMD.CodedCharSetId);
SET Substringed = SUBSTRING(CAST(Root.BLOB.BLOB AS CHAR CCSID Root.MQMD.CodedCharSetId) FROM 1 FOR 1); |
Regards. |
|
Back to top |
|
 |
EddieA |
Posted: Wed Nov 16, 2005 10:52 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
CAST(Body.BLOB.BLOB AS CHAR CCSID 437) |
And is your BLOB in CCSID 437.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Bravo |
Posted: Thu Nov 17, 2005 2:34 pm Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Thanks for your quick response!!!
the code works fine and here is the code I executed.
Code: |
if SUBSTRING (CAST(Body.BLOB AS CHAR CCSID Root.MQMD.CodedCharSetId) FROM 1 FOR 1) = 'N' then
return true;
else
return false;
end if;
|
I really appreciate for your time. _________________ Bravo |
|
Back to top |
|
 |
Bravo |
Posted: Thu Nov 17, 2005 2:40 pm Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Thanks for your quick response!!!
the code works fine and here is the code I executed.
Code: |
if SUBSTRING (CAST(Body.BLOB AS CHAR CCSID Root.MQMD.CodedCharSetId) FROM 1 FOR 1) = 'N' then
return true;
else
return false;
end if;
|
I really appreciate for your time. _________________ Bravo |
|
Back to top |
|
 |
|