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 » JMS and Coded Character Set

Post new topic  Reply to topic
 JMS and Coded Character Set « View previous topic :: View next topic » 
Author Message
dc01bb
PostPosted: Tue May 04, 2004 10:56 am    Post subject: JMS and Coded Character Set Reply with quote

Novice

Joined: 25 Oct 2001
Posts: 17
Location: Bruce Baxter

I'm making my first foray into the world of JMS. I understand this is hot stuff in the Java world, but to someone who's used to doing it the old fashioned way in COBOL, C, ASM, or with the base Java classes, it has the feel of added (unnecessary) bells and whistles.

We're looking to put JAVA code on Windows and AIX platforms that will connect to Queue Managers on those boxes and use JMS to put messages to an MQSeries Queue that's clustered and resides on an OS390 Queue Manager.

The receiving application is written in Cobol and has no knowledge of the JMS add-ons that get integrated into the message. I've already gotten to the point of setting the targetClient property so that no RFH gets pre-pended to the message. Now I'm trying to rectify the character set encoding issues.

I'm currently testing on my PC, which, if memory serves me, uses CP 1252. My mainframe queue manager's default is 500 (though admittedly, 037 is probably better). The receiving application requests translation to 037.

When I put with JMS, I'm getting a 2111 reason code on the GET in the receiving application because the 1208 code page that my JVM uses (UTF8?) isn't on the list of supported code pages in my V2.1 queue manager there.

I'm struggling with how to get my Java client code to put the message in a more friendly code page like 1252 or 819.

I've tried the following code, to no avail.

TextMessage outMessage = session.createTextMessage();
outMessage.setIntProperty("CodedCharSetId",819);
System.out.println("Adding Text");
outMessage.setText(outString);

What am I doing wrong? The message still arrives at the queue manager with the 1208 (UTF8) CCSID on it.
_________________
IBM Certified Specialist - MQSeries
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
fjb_saper
PostPosted: Tue May 04, 2004 11:34 am    Post subject: Reply with quote

Grand High Poobah

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

In JMS make sure that you're sending a TextMessage (Session.createTextMessage())
On the mainframe make sure that you set your open options on the message to include translate.

That should do it.

Hope floats ... eternal.
F.J.
Back to top
View user's profile Send private message Send e-mail
fschofer
PostPosted: Tue May 04, 2004 11:35 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Look here:
http://www.mqseries.net/phpBB2/viewtopic.php?t=10518&highlight=setccsid
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 » JMS and Coded Character Set
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.