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 » IBM MQ API Support » MQEnvironment.CCSID

Post new topic  Reply to topic
 MQEnvironment.CCSID « View previous topic :: View next topic » 
Author Message
Takidoso
PostPosted: Wed Jun 09, 2010 6:31 am    Post subject: MQEnvironment.CCSID Reply with quote

Novice

Joined: 08 Mar 2007
Posts: 19
Location: Germany

Hi,
I have a funny problem.
I am using MQEnvironment for setting host name, port etc. as well as CCSD.
On MQ-Manager my messages seem to come in with the default ccsid "819" although I am explicitly setting it to 1208.
traces of my program show me that I am really setting it to 1208.
my initialisation looks like this:

Code:

...
        if (m_host != null)
        {
            mqLogger.log(Level.FINER, "hostname set to " + m_host);
            MQEnvironment.hostname = m_host;
            MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
        }
        if (m_channelName != null)
        {
            mqLogger.log(Level.FINER, "channel set to " + m_channelName);
            MQEnvironment.channel = m_channelName;
        }
        if (m_port != 0)
        {
            mqLogger.log(Level.FINER, "port set to " + m_port);
            MQEnvironment.port = m_port;
        }
        if (m_ccsid != 0)
        {
            mqLogger.log(Level.FINER, "CCSID set to " + m_ccsid);
            MQEnvironment.CCSID = m_ccsid;
        }
...


All those variables are obviously taken but not CCSID.
on this page

http://middleware.its.state.nc.us/middleware/Documentation/en_US/htm/csqzaw09/csqzaw0920.htm

I found out that it could be the MQC.TRANSPORT_PROPERTY when it is set to bindings mode. But actually as you can see I am using "MQC.TRANSPORT_MQSERIES_CLIENT".
So what does or is able to kill my value that is given to "MQEnvironment.CCSID"?

thanks for hints in advance
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 09, 2010 6:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

What is the CCSID of the actual message being read?

Are you specifying conversion when you read the message?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Takidoso
PostPosted: Wed Jun 09, 2010 7:50 am    Post subject: Reply with quote

Novice

Joined: 08 Mar 2007
Posts: 19
Location: Germany

Hi Vitor,
actually I am sending the message and on the MQ-Manager, it is noticed as CCSID 819, that is obviously the default.
Do I have to put some other thing so taht it takes my given CCSID?
Back to top
View user's profile Send private message
Takidoso
PostPosted: Wed Jun 09, 2010 8:09 am    Post subject: Reply with quote

Novice

Joined: 08 Mar 2007
Posts: 19
Location: Germany

I would like to show a part of a hardcopy of the MQ-Monitoring but actually I don't really know how to upload pictures.
can sombody give me a hint?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 09, 2010 8:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Takidoso wrote:
Do I have to put some other thing so taht it takes my given CCSID?


Well .NET is not my strong suit but I'd have thought you'd need to set it at a message level rather than a connection level.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jun 09, 2010 8:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Vitor wrote:
Takidoso wrote:
Do I have to put some other thing so that it takes my given CCSID?


Well .NET is not my strong suit but I'd have thought you'd need to set it at a message level rather than a connection level.


In JMS / XMS you would set it at the Destination level.
Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Takidoso
PostPosted: Thu Jun 10, 2010 1:26 am    Post subject: Reply with quote

Novice

Joined: 08 Mar 2007
Posts: 19
Location: Germany

Well sorry I might should have said before:
I am using Java on a Solaris mashine. the MQ-Manager is on a IBM-host-mashine.
As far I understand does not the header of the message come out in the proper character code set, even though I set the CCSID, as shown before.
Some one who is monitoring the MQ-Manager on the host gave me the following informatioon in a hard copy:

Position ! CCS ID ! Data Length ! Encoding ! Format ! ...
---------------------------------------------------------------------
0 ! 819 ! 2043 ! 273 ! MQSTR ! ...
1 ! 819 ! 2053 ! 273 ! MQSTR ! ...
2 ! 819 ! 1948 ! 273 ! MQSTR ! ...

I am expecting the CCSID 1208, since I put that in the MQEnvironment in the client programme.


Last edited by Takidoso on Thu Jun 10, 2010 4:13 am; edited 1 time in total
Back to top
View user's profile Send private message
Takidoso
PostPosted: Thu Jun 10, 2010 4:11 am    Post subject: Reply with quote

Novice

Joined: 08 Mar 2007
Posts: 19
Location: Germany

fjb_saper wrote:
Takidoso wrote:
Do I have to put some other thing so that it takes my given CCSID?


In JMS / XMS you would set it at the Destination level.
Have fun


I am using java with the native MQ-Serires API.
So what do I have to do to set that on destination level concretely, if setting the MQ-Environment is not enough?
Is something to change on MQ-Manager side?
Back to top
View user's profile Send private message
Takidoso
PostPosted: Thu Jun 10, 2010 7:55 am    Post subject: Reply with quote

Novice

Joined: 08 Mar 2007
Posts: 19
Location: Germany

Ahh ok....
Now I believe I understand some more.

Since I am using MQSeries native I obvously need to set it on the Object MQMessage doint it liek this

Code:

...
MQMessage mBuf = new MQMessage();
mBuf.characterSet  = m_ccsid;
...


So it matches the hint of Vitor.

But why is there also a CCSID on the connection side?
MQEnvironment.CCSID ?
The manual hints looked to me that this would be the right place but boviously it isn't. It is quite confusing for me. When is this value to be set and what is that for then?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jun 10, 2010 7:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Takidoso wrote:
But why is there also a CCSID on the connection side?
MQEnvironment.CCSID ?
The manual hints looked to me that this would be the right place but boviously it isn't. It is quite confusing for me. When is this value to be set and what is that for then?


Well repeating what I said earlier about my .NET skills (i.e. limited) I'd imagine that would be used if you were reading a message and had requested conversion.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Jun 10, 2010 9:02 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Quote:
On MQ-Manager my messages seem to come in with the default ccsid "819" although I am explicitly setting it to 1208.


I'm assuming that 'it' is the CCSID of the message descriptor, and NOT the actual application message data.

On the sending (creating) application, CCSID in the message descriptor is used to identify the character set of the application data component of the message; not to change the data to that CCSID.

The character set of the application data is, by default, the charater set of of the creating application. The usual behavior is to let the qmgr insert its CCSID into the message descriptor.

Once the application data is populated into the message, setting the CCSID to something other than the CCSID of the qmgr does NOT alter the CSID of the application data.

Do a search on MQ data conversion for more on this.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jun 10, 2010 9:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bruce2359 wrote:
Do a search on MQ data conversion for more on this.


And if you do search, look more carefully at what you find. That link in your original post (which I promised myself I'd let go but just can't bear any longer) is an out of date non-IBM mirror site. The information in it relates to WMQv5.2 and is increasingly misleading.

The official IBM documentation is really not that hard to find.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » IBM MQ API Support » MQEnvironment.CCSID
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.