Author |
Message
|
Takidoso |
Posted: Wed Jun 09, 2010 6:31 am Post subject: MQEnvironment.CCSID |
|
|
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 |
|
 |
Vitor |
Posted: Wed Jun 09, 2010 6:53 am Post subject: |
|
|
 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 |
|
 |
Takidoso |
Posted: Wed Jun 09, 2010 7:50 am Post subject: |
|
|
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 |
|
 |
Takidoso |
Posted: Wed Jun 09, 2010 8:09 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Wed Jun 09, 2010 8:55 am Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Wed Jun 09, 2010 8:59 pm Post subject: |
|
|
 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 |
|
 |
Takidoso |
Posted: Thu Jun 10, 2010 1:26 am Post subject: |
|
|
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 |
|
 |
Takidoso |
Posted: Thu Jun 10, 2010 4:11 am Post subject: |
|
|
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 |
|
 |
Takidoso |
Posted: Thu Jun 10, 2010 7:55 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Thu Jun 10, 2010 7:58 am Post subject: |
|
|
 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 |
|
 |
bruce2359 |
Posted: Thu Jun 10, 2010 9:02 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Thu Jun 10, 2010 9:53 am Post subject: |
|
|
 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 |
|
 |
|