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 » Remove special character 'ÿ' using ESQL

Post new topic  Reply to topic
 Remove special character 'ÿ' using ESQL « View previous topic :: View next topic » 
Author Message
anilmekala
PostPosted: Thu Nov 20, 2014 2:49 am    Post subject: Remove special character 'ÿ' using ESQL Reply with quote

Acolyte

Joined: 19 Oct 2012
Posts: 63

Hi Experts,

I have requirement like need to remove special character 'ÿ' by using ESQL.


I can do it for CR and LF . Please help me how to replace or delete such characters.

Thanks in Advance.

Regards,

Anil.
Back to top
View user's profile Send private message
darioo
PostPosted: Thu Nov 20, 2014 5:34 am    Post subject: Reply with quote

Novice

Joined: 19 Mar 2009
Posts: 15

Doing what you want will depend on encoding of your input.

Assuming your input is UTF-8 (words of experience and wisdom say: it should be), figure out what the bytes that construct your particular special character are.

Here you will find all info you need about your character, if this is the one you meant. Make a mental note of UTF-8 hex encoding and use that information in your ESQL code.
Back to top
View user's profile Send private message
anilmekala
PostPosted: Thu Nov 20, 2014 9:44 pm    Post subject: Reply with quote

Acolyte

Joined: 19 Oct 2012
Posts: 63

Hi,

i build the below code to remove special character [CREATE FUNCTION RemoveSpecialChar(charInCstName CHARACTER) RETURNS CHARACTER
BEGIN
DECLARE delChar CHARACTER;
DECLARE orgStr CHARACTER;
SET delChar = CAST(X'FF' AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
SET orgStr = REPLACE(charInCstName,delChar,'');
RETURN orgStr;
END;]

am getting below exception[ExceptionList
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbDataFlowNode.cpp
Line:INTEGER:1073
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmMQInputNode
Name:CHARACTER:SAMPLE_TEST_FLOW#FCMComposite_1_1
Label:CHARACTER:SAMPLE_TEST_FLOW.MQ Input
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbComputeNode.cpp
Line:INTEGER:489
Function:CHARACTER:ImbComputeNode::evaluate
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:SAMPLE_TEST_FLOW#FCMComposite_1_3
Label:CHARACTER:SAMPLE_TEST_FLOW.Compute
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbRdl/ImbRdlStatementGroup.cpp
Line:INTEGER:641
Function:CHARACTER:SqlStatementGroup::execute
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:SAMPLE_TEST_FLOW#FCMComposite_1_3
Label:CHARACTER:SAMPLE_TEST_FLOW.Compute
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2488
Text:CHARACTER:Error detected, rethrowing
Insert
Type:INTEGER:5
Text:CHARACTER:.SAMPLE_TEST_FLOW_Compute.Main
Insert
Type:INTEGER:5
Text:CHARACTER:4.4
Insert
Type:INTEGER:5
Text:CHARACTER:CopyEntireMessage();
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbRdl/ImbRdlRoutine.cpp
Line:INTEGER:628
Function:CHARACTER:SqlRoutine::invoke
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:SAMPLE_TEST_FLOW#FCMComposite_1_3
Label:CHARACTER:SAMPLE_TEST_FLOW.Compute
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2934
Text:CHARACTER:Error occured in procedure
Insert
Type:INTEGER:5
Text:CHARACTER:CopyEntireMessage
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbRdl/ImbRdlStatementGroup.cpp
Line:INTEGER:641
Function:CHARACTER:SqlStatementGroup::execute
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:SAMPLE_TEST_FLOW#FCMComposite_1_3
Label:CHARACTER:SAMPLE_TEST_FLOW.Compute
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2488
Text:CHARACTER:Error detected, rethrowing
Insert
Type:INTEGER:5
Text:CHARACTER:.SAMPLE_TEST_FLOW_Compute.CopyEntireMessage
Insert
Type:INTEGER:5
Text:CHARACTER:8.3
Insert
Type:INTEGER:5
Text:CHARACTER:SET OutputRoot.XML.AOFPacketDataSegment.Invoice_Header.Billing_Company_Name = TRIMBOTH(BOTH FROM COALESCE(RemoveSpecialChar(refBT.(XML.Attribute)CustNm), ''));
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbRdl/ImbRdlRoutine.cpp
Line:INTEGER:628
Function:CHARACTER:SqlRoutine::invoke
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:SAMPLE_TEST_FLOW#FCMComposite_1_3
Label:CHARACTER:SAMPLE_TEST_FLOW.Compute
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2934
Text:CHARACTER:Error occured in procedure
Insert
Type:INTEGER:5
Text:CHARACTER:RemoveSpecialChar
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbRdl/ImbRdlStatementGroup.cpp
Line:INTEGER:641
Function:CHARACTER:SqlStatementGroup::execute
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:SAMPLE_TEST_FLOW#FCMComposite_1_3
Label:CHARACTER:SAMPLE_TEST_FLOW.Compute
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2488
Text:CHARACTER:Error detected, rethrowing
Insert
Type:INTEGER:5
Text:CHARACTER:.SAMPLE_TEST_FLOW_Compute.RemoveSpecialChar
Insert
Type:INTEGER:5
Text:CHARACTER:5.4
Insert
Type:INTEGER:5
Text:CHARACTER:SET delChar = CAST(X'ff' AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId);
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbRdl/ImbRdlTypeCast.cpp
Line:INTEGER:260
Function:CHARACTER:SqlTypeCast::evaluate
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2521
Text:CHARACTER:Error while casting
Insert
Type:INTEGER:5
Text:CHARACTER:.SAMPLE_TEST_FLOW_Compute.RemoveSpecialChar
Insert
Type:INTEGER:5
Text:CHARACTER:5.18
Insert
Type:INTEGER:5
Text:CHARACTER:X'ff'
Insert
Type:INTEGER:5
Text:CHARACTER:CHARACTER
RecoverableException
File:CHARACTER:/build/S700_P/src/CommonServices/ImbConverter.cpp
Line:INTEGER:496
Function:CHARACTER:ImbConverterCPP::internalToUnicode
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2135
Text:CHARACTER:Unconvertable character
Insert
Type:INTEGER:5
Text:CHARACTER:ff
Insert
Type:INTEGER:5
Text:CHARACTER:ff
Insert
Type:INTEGER:2
Text:CHARACTER:1208][/quote][/code]
Back to top
View user's profile Send private message
darioo
PostPosted: Thu Nov 20, 2014 11:51 pm    Post subject: Reply with quote

Novice

Joined: 19 Mar 2009
Posts: 15

The link I provided states that "C3BF" is a hex sequence for your character. "FF" (what you're using) isn't a valid UTF-8 hex sequence.
Back to top
View user's profile Send private message
anilmekala
PostPosted: Fri Nov 21, 2014 12:41 am    Post subject: Reply with quote

Acolyte

Joined: 19 Oct 2012
Posts: 63

Hi ,

Thank you so much for your help.

Its working.

Regards,

Anil.
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 » Remove special character 'ÿ' using ESQL
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.