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 API Support » ASCII to EBCDIC conversion

Post new topic  Reply to topic
 ASCII to EBCDIC conversion « View previous topic :: View next topic » 
Author Message
d
PostPosted: Fri May 24, 2002 12:42 am    Post subject: ASCII to EBCDIC conversion Reply with quote

Apprentice

Joined: 24 May 2002
Posts: 25

Hi,
Can any one provide me any help/tips/code for the conversion exit to be written in Java, for ASCII to EBCDIC conversion and vice versa, required between AS/400 and other operating systems(WinNT).

Thanks in advance,
d
Back to top
View user's profile Send private message
oz1ccg
PostPosted: Fri May 24, 2002 2:22 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Hmmm......... ???

Why conversion exit ??

I've been dealing with MQSeries for some time.....

Well I've told our developers and architets only to use format=MQSTR, this goes back before MQSeries and to the good old days...

Because using conversion exits and so on, requires that the MQSeries systemprogrammers have to change the exit when developers introduces some minor changes in the application communication protocol, and we maybee have to deal with more version of those d.... exits.

When using MQSTR and plain ASCII/EBCDIC MQSeries does the conversion automaticly when specifying MQGMO_CONVERT.

That's my two cents.
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
d
PostPosted: Tue May 28, 2002 3:11 am    Post subject: Reply with quote

Apprentice

Joined: 24 May 2002
Posts: 25

I added MQGMO_CONVERT option in the java application(in NT) that retrieves the message. But it is throwing an exception.
Details :
Exception : java.io.UnsupportedEncodingException: Cp437

Any idea ????

Thanks in advance,
d
Back to top
View user's profile Send private message
oz1ccg
PostPosted: Tue May 28, 2002 4:41 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Hi,
It sounds to me that there might be a little problem with some of the messasge descriptor data, so let's try figureing it out:

What is in MQMD.FORMAT ? is it "MQSTR " ?
What is MQMD.Encoding set to ? 437 ?
What is MQMD.CodedCharSetId ?

d wrote:

Exception : java.io.UnsupportedEncodingException: Cp437
d


This piece is taken from los manualos(prog. guide)

Quote:
Application data is converted within an application program when the MQGMO_CONVERT option is specified in the Options field of the MQGMO structure passed to an MQGET call, and all of the following are true:

* The CodedCharSetId or Encoding fields set in the MQMD structure
associated with the message on the queue differ from the CodedCharSetId or Encoding fields set in the MQMD structure specified
on the MQGET call.

* The Format field in the MQMD structure associated with the message is not MQFMT_NONE.

* The BufferLength specified on the MQGET call is not zero.

* The message data length is not zero.

* The queue manager supports conversion between the CodedCharSetId and Encoding fields specified in the MQMD structures associated with the message and the MQGET call. See the MQSeries Application Programming Reference manual for details of the coded character set identifiers and machine encodings supported.

* The queue manager supports conversion of the message format. If the Format field of the MQMD structure associated with the message is one of the built-in formats, the queue manager is able to convert the message. If the Format is not one of the built-in formats, you need to write a data-conversion exit to convert the message.

_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
d
PostPosted: Tue May 28, 2002 8:49 pm    Post subject: Reply with quote

Apprentice

Joined: 24 May 2002
Posts: 25

Hi,

My MQMessage format is MQSTR,
Encoding : 273
Coded Character Set Id is 819.

Even after I changed the encoding to 437, the same exception is coming. I'm using MQJava class version 2 and JDK1.3.1.

Thanks in advance,
d
Back to top
View user's profile Send private message
oz1ccg
PostPosted: Wed May 29, 2002 1:41 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Hi "d",

try setting the MQCCSID environment variable to the codepage that you want eg 819. I don't reall how it can be set thru JAVA.

If you're using connection factory it's the CCSID parameter.

I hope it might help you further on.
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
d
PostPosted: Thu May 30, 2002 9:04 pm    Post subject: Reply with quote

Apprentice

Joined: 24 May 2002
Posts: 25

Hi Jorgen,

The exception stopped coming after I included i18n.jar.

Thanks a lot.

regards,
d
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 API Support » ASCII to EBCDIC conversion
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.