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 Installation/Configuration Support » Custom EBCDIC to ASCII translation in MQSeries

Post new topic  Reply to topic
 Custom EBCDIC to ASCII translation in MQSeries « View previous topic :: View next topic » 
Author Message
klarue
PostPosted: Thu May 08, 2003 9:01 am    Post subject: Custom EBCDIC to ASCII translation in MQSeries Reply with quote

Newbie

Joined: 07 May 2003
Posts: 1
Location: Dallas TX, USA

Can someone point me to instructions on how to define a custom EBCDIC to ASCII translation table for MQSeries on the mainframe.

I have a Unix application that is receiving data from my MVS application and the special characters on the MVS side are set to 'custom codepoints' in my codepage. (Circle R for registered trademark, and TM for trademark).

When one of the special characters, X'56' for instance, is converted, the hex code gets translated to an unknown character representation X'6F' or "?" in ASCII. I have multiple special characters in my font and they ALL get translated to the X'6F' and I cannot distinguish between them on the Unix side.

Is there anyway to customize the translation/conversion process?
I would like to control what each of my EBCDIC characters gets 'converted to'.

Any direction on where to look, or examples would be great.

Thanks
_________________
CSC - AT&T Account
Ken LaRue
klarue@csc.com
(972) 587-4433
Back to top
View user's profile Send private message
mcruse
PostPosted: Wed May 14, 2003 5:19 am    Post subject: Reply with quote

Novice

Joined: 15 Apr 2002
Posts: 13
Location: Germany

You need two things.

First the CCSID of the message send by the MVS system. Have a look at the message descriptor
Second the CCSID of your queue manager (runmqsc, dis qmgr).

Now you can look at the conversion table used by the queue manager.

Example:

MVS CCSID: 500 0x01F4
UNIX CCSID: 819 0x0333

Using conversion table 01F40333.tbl or 033301F4.tbl (I am not sure).

If you have received special characters you can edit the used conversion table (please backup before)

I hope it helps

_________________
Markus Cruse

IBM Certified Specialist MQSeries
Back to top
View user's profile Send private message
tillywern
PostPosted: Mon May 19, 2003 11:26 am    Post subject: Translation rules of thumb Reply with quote

Centurion

Joined: 28 Jan 2003
Posts: 109
Location: Colorado

There are a couple of things to observe with regard to how MQ does translation. MQ series used the CCSID of the sending and receiving machine to derive which code page conversion to use if MQGMO_CONVERT is specified.

Translation of characters other than a-z,A-Z,0-9,and most punctuation marks is not very trustworthy. At least in my experience. Especially when you start noticing that UK EBCDIC is different than US EBCDIC. Yuk.

You have relatively few options to resolve the issue you stated.
1. You can keep trying different code pages until the transformation works as you want.
2. You can write your own transformation routine that does the mapping the way you want. Not to hard.
3. Or you can used some sort of markup for characters such as the ones you are talking about.

It is important to remember that while MQ does a good job of translating printable characters….. Some of the common extended characters are not supported.

We use some markup standards to allow us to pass these types of characters. Unfortunately that usually means writing your own parser or constructor.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
tillywern
PostPosted: Tue May 20, 2003 1:07 pm    Post subject: C example Reply with quote

Centurion

Joined: 28 Jan 2003
Posts: 109
Location: Colorado

The easiest way to write a custom translation table is via a C array.

define an array of characters that is 256 bytes long.

char ebcdic_to_ascii[256];

Then populate the array with the ascii value that corresponds to the binary representation of the ebcdic data.

ebcdic_to_ascii[0x40]=0x20;

After creating an entire range of values 0x00-0xFF then you would have created you mapping function.... You should find that there is at least one character on the mainframe that mapps to two ascii characters... For me it was [ and !.. So you will have to choose wich one you want.

Maybe they have fixed this since I had to deal with it.

so after populating the array you have created, in essence, a transformation function... Call it like this...

for(cot=0;cot<msglen;cot++)
{
buffer[cot]=ebcdic_to_ascii[buffer[cot]];
}


where msglen is the length of the data buffer.

In the end you can initialized the array at startup so you don't have to wast CPU setting each value.

char ebcdic_to_ascii[256]={0x00,0x01,....0xFF};

Hope this helps.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Custom EBCDIC to ASCII translation in MQSeries
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.