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 » replace special characters in input

Post new topic  Reply to topic Goto page 1, 2  Next
 replace special characters in input « View previous topic :: View next topic » 
Author Message
vijsam
PostPosted: Tue Jun 21, 2011 10:38 pm    Post subject: replace special characters in input Reply with quote

Apprentice

Joined: 01 Jun 2011
Posts: 46

Hello All,

Iam receiving ö special characters in input files,so when i try to pick them using blob then it fails with 2135 : Unconvertable character.when i try to replace them with SET BLOBInput = REPLACE(BLOBInput,X'1f'); iam facing error with 2590 : String is not of correct form for byte array. Must have even number of characters.....Please help

ThanksIn Advance..
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jun 22, 2011 2:06 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
when i try to pick them using blob then it fails with 2135 : Unconvertable character
You are treating it as a character string, not as a BLOB. If you were treating the input as BLOB it would not be trying to convert it to characters.
Quote:
when i try to replace them with SET BLOBInput = REPLACE(BLOBInput,X'1f'); iam facing error with 2590
Why are you trying to replace these characters? Are you sure that the input CodedCharSetId is correct?
Back to top
View user's profile Send private message
vijsam
PostPosted: Wed Jun 22, 2011 2:51 am    Post subject: replace special characters in input Reply with quote

Apprentice

Joined: 01 Jun 2011
Posts: 46

yes.... I want replace the special charcters......in the input file and iam setting the correct ccsid.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jun 22, 2011 3:10 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Have you tried X'1F'?
Back to top
View user's profile Send private message
vijsam
PostPosted: Wed Jun 22, 2011 3:20 am    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2011
Posts: 46

ya i have tried with X '1F' too...any suggestions plzzz
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jun 22, 2011 7:03 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
in the input file and iam setting the correct ccsid
If the ccsid is correct then why are you getting the 'Unconvertable character' error?
Back to top
View user's profile Send private message
vijsam
PostPosted: Wed Jun 22, 2011 11:00 pm    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2011
Posts: 46

i used SET BLOBvalue=CAST(InputRoot.BLOB.BLOB AS CHAR CCSID InputRoot.Properties.CodedCharSetId Encoding InputRoot.Properties.Encoding);....I hope this works right for CCSID.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jun 23, 2011 12:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If that code caused the unconvertable character error then either
a) the CCSID on the input node is wrong
or
b) the sender is sending bad data.

In other words, I'm not (yet) convinced that simply removing these 'bad' characters is the correct solution. It might be the right thing to do, but it might not.
Back to top
View user's profile Send private message
vijsam
PostPosted: Thu Jun 23, 2011 1:18 am    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2011
Posts: 46

any suggestions Kimbert.........Plz.....any valuable inputs....from ur side....
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jun 23, 2011 1:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

- What is the CCSID?
- Why does the input data cause an error when you convert it to that CCSID?
Back to top
View user's profile Send private message
vijsam
PostPosted: Thu Jun 23, 2011 2:09 am    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2011
Posts: 46

The input data is causing problems as there are special characters in it and we have to accept them anyways....
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jun 23, 2011 2:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You are getting Unconvertible character errors because, exactly and only, the characters in the input message DO NOT MATCH the CCSID of the message itself.

That is exactly and only the reason for this error.

This is *always* the fault of the sending application.

If you cannot change the sending application - and this should be the first thing you try to do and you should not give up on this easily - then you need to stop trying to read the input message as CHARACTERS and start trying to read it as BYTES and then "fix" the "special" characters by replacing their bytes with other bytes. Then, when you *know* the message actually matches the CCSID, you can treat the message as characters again.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jun 23, 2011 2:54 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
The input data is causing problems as there are special characters in it
I do not know what you mean when you say 'special character'?
IF the CCSID in the FileInput node has been set correctly
AND the sender has not made a mistake
THEN all of the characters will be converted successfully.

So...please explain, in detail, why you cannot handle a 'special character'.
Back to top
View user's profile Send private message
vijsam
PostPosted: Thu Jun 23, 2011 4:05 am    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2011
Posts: 46

If we set SET BLOBvalue=CAST(InputRoot.BLOB.BLOB AS CHAR CCSID InputRoot.Properties.CodedCharSetId Encoding InputRoot.Properties.Encoding),then will there be any difference in CCSID??what ever ll be the CCSID in the input file ,it will be coming to the value right??? correct me if iam wrong...and special character example:ä ö
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jun 23, 2011 4:30 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
what ever ll be the CCSID in the input file ,it will be coming to the value right???
No. You are making a wrong assumption. You are probably assuming that FileInput works exactly like MQInput. It doesn't:
MQ:
If the message contains text data, then the CCSID of the text data is specified in MQMD.CodedCharSetId. The MQInput node automatically copies InputRoot.MQMD.CodedCharSetId to InputRoot.Properties.CodedCharSetId.
File
A file does not have any way of specifying the CCSID of its contents. That is why the FileInput node offers the 'Message Coded Character Set Id' property. You may have set that property to the wrong value.

See http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac55150_.htm#ac55150_tmp
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » replace special characters in input
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.