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 » ebcdic in jms : urgent pl..!

Post new topic  Reply to topic
 ebcdic in jms : urgent pl..! « View previous topic :: View next topic » 
Author Message
maxis
PostPosted: Sun May 18, 2003 12:03 pm    Post subject: ebcdic in jms : urgent pl..! Reply with quote

Centurion

Joined: 25 Jun 2002
Posts: 144

how to read a EBCDIC message from a main-frame ? ....when I print the message (bytesMessage) object its showing ..CCSID of 500.

while creating queue object ....am using the sting as following

Code:

queue = queueSession.createQueue("queue://HOST1.QM1/"+queueName+"?persistence=1&priority=5"&CCSID=1208&encoding=273);

queueReceiver = queueSession.createReceiver(queue) ;
Message msg = queueReceiver.receiver() ;
System.out.println("message object "+msg);



Am still seeing the bytes message ... I was expecting message to get converted to 1208 (UTF8) so that its in readable format ...but its not ..

will someone tell me ...what's wrong is happening in the above code ? quick help ..tip would be greatly appreciated ....

thanks
M
Back to top
View user's profile Send private message
sknrt1
PostPosted: Mon May 19, 2003 11:18 am    Post subject: Need to handle the conversion from EBCDIC-ASCII Reply with quote

Apprentice

Joined: 22 Jan 2003
Posts: 39
Location: USA

Hi,

The EBCDIC has to be converted into ASCII in the MainFrame,
Once it is done u can receive the message as 'bytesMessage'.

U need to use an Exit Routine for the conversion or some other way.

And u can't specify the CCSID=1208,

Here r the different values u can speciy, if u r reading a message from Queue Manger on

windowsNT = 819
Unix = 819

The QM will handle conversion to its format (btn diff OS).

Basically avoid specifying the CCSID and Encoding in the Queue Object.
Just take care of conversion above mentioned. And u should be able to read the messages in bytesMessage.

Here i have a question (since info u provided isn't clear..)?
r u using JMS application to read message directly from a MainFrame Queue? (have u succeded in doing so..)

thanks
Back to top
View user's profile Send private message
maxis
PostPosted: Mon May 19, 2003 11:54 am    Post subject: Reply with quote

Centurion

Joined: 25 Jun 2002
Posts: 144

yes youre right ..am using jms to read the message directly from the main frame queue.

And changing the definition of the queue isnt possible. All trick / manipulation have to done at jms coding level.

dont tell me that am still not clear

as always .. any quick help, tip is appreciated ..



thanks
M
Back to top
View user's profile Send private message
sknrt1
PostPosted: Mon May 19, 2003 12:48 pm    Post subject: Reply with quote

Apprentice

Joined: 22 Jan 2003
Posts: 39
Location: USA

Hi,

If u r using JMS directly to read from a MainFrame Queue,
and
creating a Queue Object instace the following way

queue = queueSession.createQueue("queue://HOST1.QM1/"+queueName+"?persistence=1&priority=5"&CCSID=1208&encoding=273);

It will not work, as there won't be any message with CCSID=1208 in Main Frame Queues.
Because UTF-8 format is not supported by MQ on MainFrame. And ur JMS application doesn't handle the format conversion. It just maps between different JMS message formats. Thats the basic reason u r not able to read the messages.

As i told u in the earlier response, after handling the EBCDIC - ASCII conversion, if u use the JMS to read the message(ASCII), as 'bytesMessage' u will get the message. If u call 'toString' on bytesMessage it will return u the 'UTF-8' string format.

thanks
Back to top
View user's profile Send private message
maxis
PostPosted: Tue May 20, 2003 5:23 am    Post subject: Reply with quote

Centurion

Joined: 25 Jun 2002
Posts: 144

I fixed it at the java level ...


thanks everyone ..


sharpyk - byteMessage.toString() didnt worked ...since I've made it working at java level ...I guess its ok


thanks
M
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » ebcdic in jms : urgent pl..!
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.