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 Java / JMS » Java reading CCSID 1051

Post new topic  Reply to topic
 Java reading CCSID 1051 « View previous topic :: View next topic » 
Author Message
PeterPotkay
PostPosted: Wed Apr 27, 2005 7:33 am    Post subject: Java reading CCSID 1051 Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Java MQClient running on Windows.

Connectis to a Windows QM for MQGETs.


Putting application is C on another platform.

When the message arrives from the app running on Tru64, it has a CCSID of 819, and the Java app is happy getting the message.

But if the putting app is run as an MQClient on a HP-UX server connecting to that same Windows QM, the messages are coded with a CCSID of 1051, and the Java app is blowing up on the conversion.

Looking at other posts,
http://www.mqseries.net/phpBB2/viewtopic.php?t=21403&highlight=1051
I see that switching the CCSID of the HP-UX message to 819 will solve the problem.

My question is what is the best way, and are both of these options valid?

#1 -I ask the sending app running on HP-UX to set the MQMD_CCSID to 819 on the MQPUT.
-or-
#2 - In the Quick Beginnings for HP-UX, Chapter 3, Setting the QM CCSID, it says I can use the LANG parameterto change the codeset and CCSID:
Code:

export LANG=en_US.iso88591

But I am not clear if that can be set on the HP-UX MQClient server. There is no HP-UX QM involved - just an HP-UX MQClient putting to the Windows QM.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 27, 2005 8:07 am    Post subject: Re: Java reading CCSID 1051 Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

PeterPotkay wrote:
#2 - In the Quick Beginnings for HP-UX, Chapter 3, Setting the QM CCSID, it says I can use the LANG parameterto change the codeset and CCSID:
Code:

export LANG=en_US.iso88591

But I am not clear if that can be set on the HP-UX MQClient server. There is no HP-UX QM involved - just an HP-UX MQClient putting to the Windows QM.

This environment variable would be set in the shell that is running the process that is using the MQClient API.

That is, either put it in the .profile for the userid that's running the client app, or in a startup script for the client app.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Apr 27, 2005 12:09 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Jeff, what would you do if this was your app? Would you code the CCSID to 819 prior to the MQPUT? Or would you set the environment variable?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 27, 2005 12:54 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This may not help much.

I would do whatever best preserved the separation of sender and receiver.

That said, there may be other reasons to set the environment variable for the client app - like ensuring that proper character conversion / language set translation happens when interacting with databases.

You've never known fun until you've tracked down a failure of a Web App to properly display Japanese characters extracted from a database (but NOT in the static HTML!) to be caused by a failure to set a language variable in the app server's environment.

Especially when it's someone else who figures it out... but you're in charge of the app server!

Consult your platform folks about the impact of setting or not setting this environment variable. They may insist that it be set all the time anyway.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 27, 2005 7:05 pm    Post subject: Reply with quote

Grand High Poobah

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

If I may add another 2c...
Setting the environment variable keeps the source more portable...

Enjoy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Java reading CCSID 1051
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.