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 » Special Characters in data retrieved by ESQL from Oracle

Post new topic  Reply to topic
 Special Characters in data retrieved by ESQL from Oracle « View previous topic :: View next topic » 
Author Message
amvit
PostPosted: Thu Mar 03, 2011 8:33 pm    Post subject: Special Characters in data retrieved by ESQL from Oracle Reply with quote

Newbie

Joined: 03 Mar 2011
Posts: 4

Hello,
Environment details - WMB 6.1.0.4 on Windows
Database - Oracle 10g on Windows

I have one ESQL function that is executing a Select query against a database table as below
Code:
DECLARE CONFIGDBDATA ROW;
DECLARE SchemaName CHAR Get_Schema();
SET CONFIGDBDATA.RECORD[] = SELECT col1, col2 , col3 FROM Database.{SchemaName}.MY_CONFIGURATION AS T;

Once executed I iterate through the records. While iterating I found some junk character in the column values. for e.g if a col1 has a value "Amit" in database, the value that is retrieved during iteration is
Quote:
A[junkchar]M[junkchar]I[junkchar]T[junkchar].


The data is accessed using

Code:

CONFIGDBDATA.RECORD[COUNT].col1



I am not sure why this is happening. Whenever I run the query directly against the database using SQL editor, data retrieved does not show junk characters.

Any help shall be highly appreciated.

Regards,
Amit
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Thu Mar 03, 2011 9:33 pm    Post subject: Re: Special Characters in data retrieved by ESQL from Oracle Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Look here.
Back to top
View user's profile Send private message
skoobee
PostPosted: Thu Mar 03, 2011 10:23 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Nov 2010
Posts: 52

The data is in Unicode, UCS-2, a double-byte character set, WMB's working char set. What you are referring to as junk characters are the second bytes of each character.

THERE ARE NO SPECIAL CHARACTERS, THERE ARE JUST CHARACTERS!
Back to top
View user's profile Send private message
amvit
PostPosted: Sun Mar 06, 2011 4:56 am    Post subject: Reply with quote

Newbie

Joined: 03 Mar 2011
Posts: 4

Hello all,
Thanks a lot for valuable information.
The correct configuration of DSN resolved this issue with 2 byte sized character data.
Sorry I did not realize earlier that its not special characters. I struggled initially because I was looking at the logs in Notepad, where it showed only spaces. It is only when I started looking at the logs in WMBKT understood there is that extra char that is coming.
I had created the DSN using Oracle driver instead of the MQ one that is mentioned in the documentation.

Thank you once again for your support.

Regards,
Amit
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Sun Mar 06, 2011 8:22 am    Post subject: Re: Special Characters in data retrieved by ESQL from Oracle Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

skoobee wrote:
THERE ARE NO SPECIAL CHARACTERS, THERE ARE JUST CHARACTERS!

Perhaps, but it's not worth SHOUTing about. Those not familiar with the formal terminology often use the term "special characters" to informally describe non-printable characters, non-ASCII characters, characters that require some form of escaping mechanism such as XML/HTML entities, or unexpected characters introduced by improper conversion. The usage is widespread enough that it usually serves to get the point across. But feel free to offer a more precise term instead, whenever the need arises.
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 » Special Characters in data retrieved by ESQL from Oracle
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.