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 IndexMainframe, CICS, TXSeriesCICS EBCDIC to W2K code page conversion

Post new topicReply to topic
CICS EBCDIC to W2K code page conversion View previous topic :: View next topic
Author Message
mreloaded
PostPosted: Tue Mar 09, 2004 6:57 am Post subject: CICS EBCDIC to W2K code page conversion Reply with quote

Newbie

Joined: 09 Mar 2004
Posts: 4

I am tring to move a file from MVS to W2K using MQSTRING type. THe original data on MVS has French characters x71, x74 which are the Es with accent marks. When it gets to the W2K the x71 is converted to x90 and x74 to xBE. As far as I can tell, the codepage on the W2K is 437 (default). The x90 seems ok, however, the xBE is not.

Can I specify which codepage to use during conversion?
Should I look at changing the codepage on MVS MQPUT or on the W2K MQGET?
How do you change the codepage for one queue?
Back to top
View user's profile Send private message
kman
PostPosted: Wed Mar 10, 2004 12:18 am Post subject: Reply with quote

Partisan

Joined: 21 Jan 2003
Posts: 309
Location: Kuala Lumpur, Malaysia

Some special characters are not converted nicely between ASCII and EBCDIC. Even if you play around with the codepage, they are still not converted correctly. In that instance, you have to write your own data conversion. There was a similar discussion on this forum - try the search option. - Don't get angry with me for suggestion you to search.

In your case where, the codepage clearly is different, and also using a different encoding, the conversion using MQGMO_CONVERT on the MQFMT_STRING may not work. I'd suggest an exit.

In case you want to change your codepage, try Alter QMgr.
Back to top
View user's profile Send private message Yahoo Messenger
mreloaded
PostPosted: Wed Mar 10, 2004 4:49 am Post subject: Reply with quote

Newbie

Joined: 09 Mar 2004
Posts: 4

I did find this post under the subject :EBCDIC TO ASCII conversion

[quote="zpat"]If you send all your data as MQSTR (eg XML) and use MQGET with CONVERT (or the equivalent tick box on a MQINPUT node) then this issue does not happen.

It's a good idea to code all applications with MQGET with CONVERT so that you can later change the queue manager from distributed to mainframe (should you need to) without changing the application.[/quote]


I am not familiar with this CONVERT function. The way I understand it is once I MQGET the message, I then use a CONVERT function. Does this sound correct? My concern is that if I browse the messaegs in the queue on the W2K machine, the conversion already took place. So, I was wandering if I do a convert on the MVS side when I MQPUT the message on the remote queue?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 10, 2004 5:53 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

mreloaded wrote:
I am not familiar with this CONVERT function. The way I understand it is once I MQGET the message, I then use a CONVERT function. Does this sound correct?


No. Convert is an option that you supply to the Get statement, as part of the GetMessageOptions structure.

mreloaded wrote:
So, I was wandering if I do a convert on the MVS side when I MQPUT the message on the remote queue?

There are a number of reasons for doing a conversion at the receiving side, rather than at the sending side.

The main reason is that one of the big advantages of using MQSeries for application communication is that it allows you to separate and isolate the sending side from the receiving side. If your sending application is doing the conversion, then your sending application has to know what platform the receiving side is on - which isn't very isolated.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mreloaded
PostPosted: Wed Mar 10, 2004 6:35 am Post subject: Reply with quote

Newbie

Joined: 09 Mar 2004
Posts: 4

OK. Here's what Ive tried. I have added the MQGMO_CONVERT option to the MQGMO sturcture, and I set the MQMD.CodedCharSetId = 37.

When I MQGET the message, garbage comes out. If I only use the MQGMO_CONVERT option, nothing is converted (at least corerctly).

On the CICS dataset, the original data is (hex)
C8 71 D3 74 D5 C5 (Code page 37 HELENE where the 1st & 2nd Es have accents.

The recieved data is
48 90 4C BE 4E 45 (code page 437 HL¾NE)

Neither scenario is optimal.

So, I'm assuming the messages on the receiving queue are already converted, and I can't undo this conversion.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 10, 2004 8:06 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There may be no conversion happening until your program gets the data.

You say that when you don't specify the MQGMO_CONVERT, that the data is not converted. Are the hex values you posted for the "received" data from your get without conversion? Or from the data on the queue before you try and get it?

I don't know myself whether there are specific translation issues with going from CCSID 37 to CCSID 437, but I know that the documentation includes a list of translations that are available. You may not be specifying the correct CCSID, or there may be a different one you can use that will work better.

The other thing to check is the channel. Channels have a data conversion option, which essentially causes the channel agent to issue a get with convert. If your channel is set up to perform the conversion, then you should be getting back already converted data - and I believe that the Get will throw a return code indicating "No conversion needed" or some such.

And again, as kman said "Some special characters are not converted nicely between ASCII and EBCDIC". So you may have to write an exit or create a conversion table if you can't find a preexisting conversion table that covers your special characters.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mreloaded
PostPosted: Wed Mar 10, 2004 8:37 am Post subject: Reply with quote

Newbie

Joined: 09 Mar 2004
Posts: 4

jefflowrey wrote:
Are the hex values you posted for the "received" data from your get without conversion? Or from the data on the queue before you try and get it?


The hex values are when I leave the defaults (no CONVERT option, no codepage).

They are also the same if I use the CONVERT option (without specifing a codepage).

They are garabage if I use CONVERT & CodePage 37

Before MQGET, I browse the data and the data appears to be converted. I thought this may have been the MQ Explorer translating though.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexMainframe, CICS, TXSeriesCICS EBCDIC to W2K code page 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.