|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JMS and Coded Character Set |
« View previous topic :: View next topic » |
Author |
Message
|
dc01bb |
Posted: Tue May 04, 2004 10:56 am Post subject: JMS and Coded Character Set |
|
|
 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 |
|
 |
fjb_saper |
Posted: Tue May 04, 2004 11:34 am Post subject: |
|
|
 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 |
|
 |
fschofer |
Posted: Tue May 04, 2004 11:35 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
|
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
|
|
|
|