Author |
Message
|
Vijji |
Posted: Fri Oct 13, 2006 11:24 am Post subject: Hexadecimal non printable chars |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Hi,
My flow contains MQInputnode-->Compute Node-->MQOutput node.
Accepting input message in BLOB.In compute node i have to check the input message and if any character is non printable hexa decimal value then i have to replace that hex value with hexa decimal space.
I tried this one with substring and replace.But i'm unable to check where the input message have nonprintable chars.
I'm using MB 5.0.5
plase give me the right way how to check the whole input message.
Thanks in advance, |
|
Back to top |
|
 |
dsriksha |
Posted: Fri Oct 13, 2006 12:21 pm Post subject: Re: Hexadecimal non printable chars |
|
|
 Voyager
Joined: 27 Feb 2005 Posts: 95
|
you mean to say you wanna use POSITION function  |
|
Back to top |
|
 |
vk |
Posted: Sat Oct 14, 2006 6:19 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
From where are you getting non-printable characters? Is it possible that there is a mismatch in the CCSID because of difference in OS?
If you cast the BLOB using the CCSID in the MQMD header, then I think the characters will be readable.
Regards,
VK. |
|
Back to top |
|
 |
Vijji |
Posted: Sat Oct 14, 2006 7:19 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Thanks for ur replies,
Vk,
I 'm using substring function for checking it with nonpritable characters.when i'm casting a chacter value as blob its value is changing.How can i get the same value?
below is my code.
Code: |
WHILE inc<=noChars DO
SET hexVal=SUBSTRING(inMesg FROM inc FOR 1) ;
IF hexVal IN (CAST('0' AS BLOB CCSID 437), CAST('1' AS BLOB CCSID 437) ) THEN
--------
END IF;
SET inc=inc+1;
END WHILE;
|
Is there is any other way to compare the input blob message with nonprintable characters |
|
Back to top |
|
 |
vk |
Posted: Sat Oct 14, 2006 10:03 pm Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
Why are you casting with an explicit CCSID of 437? Is this same as the CCSID in the input MQMD header?
Try changing it to CAST('0' AS BLOB CCSID InputRoot.MQMD.CodedCharSetId)
If the CCSID of the system from which the message is coming is different from the CCSID of the system where the broker is running, then the values will not match.
Regards,
Vk. |
|
Back to top |
|
 |
Vijji |
Posted: Sun Oct 15, 2006 6:59 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
The value i'm passing to the ccsid is same as InputRoot.MQMD.CodedCharSetId.But still changing the value |
|
Back to top |
|
 |
|