|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PCF Commands via Java - Char Set Problem - Please help |
« View previous topic :: View next topic » |
Author |
Message
|
apdutta |
Posted: Tue Dec 14, 2004 2:35 am Post subject: PCF Commands via Java - Char Set Problem - Please help |
|
|
Novice
Joined: 14 Dec 2004 Posts: 11
|
I had downloaded Support Pac ms0b and some other pieces of code. I am trying to use PCF commands via Java to inquire MQ Channel Status.
I wish to connect to a remote Q Manager and get the status of the channels. Currently, I get MQ Exception with Reason Code 2195 (MQRC_UNEXPECTED_ERROR)
I execute my java program on Windows 2000 Workstation machine which has US English Locale (and jdk 1.4.2). The remote Q Manager is installed on a Windows 2000 Server with Japanese Locale Settings. The CCSID of the remote Q Manager is 932(Default for Q Managers on Japanese Windows).
If I change the CCSID of the remote Q Manager to 437(default for english OS) then, I am able to connect successfully. But, the Remote Q Manager should to have ccsid = 932 as it has to handle japanese data. I tried using the PCFMessageAgent.setCharacterSet method to set it to 437 or 932. But, still I get the MQ Error RC 2195.
I would be very grateful if someone can help. |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Dec 14, 2004 6:44 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
The 2195 error should create an FDC file. Do you have one? If so, post the top of it here. |
|
Back to top |
|
 |
apdutta |
Posted: Thu Dec 16, 2004 7:19 am Post subject: |
|
|
Novice
Joined: 14 Dec 2004 Posts: 11
|
Thanks for your response. I have found a workaround. But, I dont know if that the correct way.
Instead of the following 3 lines of original code :---
agent = new PCFMessageAgent();
agent.connect(<IP>,<PORT NO>,<Channel>);
responses = agent.send(request);
I now use the following :--
MQEnvironment.CCSID = 932;
agent = new PCFMessageAgent();
agent.connect(<IP>,<PORT NO>,<Channel>);
agent.setCharacterSet(932);
responses = agent.send(request);
Initially when I had seen the method agent.setCharacterSet() I was elated and thought that, setting it alone would solve the issue. But, later I had to also set MQEnvironment.CCSID value to make it work.
Now, I am able to successfully connect and send PCF Message request to a remote Q Mgr on a japanese machine. I am able to inquire channel status. Whoa !! |
|
Back to top |
|
 |
slaupster |
Posted: Thu Dec 16, 2004 8:05 am Post subject: |
|
|
Apprentice
Joined: 17 Nov 2004 Posts: 41
|
I'm not sure if that is the right way to do it. Is it not the case the the sending application should have a ccsid of 819, not 437 for US locale ? If you don't set the ccsid then it should default to 819. Have you tried this ?
Also, if you've got an exception stack then we can see where the problem eminates from.[/code] |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|