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 » WebSphere Message Broker (ACE) Support » EBCDIC TO ASCII conversion

Post new topic  Reply to topic
 EBCDIC TO ASCII conversion « View previous topic :: View next topic » 
Author Message
Alaa Ahmed
PostPosted: Mon Feb 16, 2004 6:16 am    Post subject: EBCDIC TO ASCII conversion Reply with quote

Newbie

Joined: 16 Feb 2004
Posts: 1
Location: Egypt

Gentlemen,
I am running a broker on AIX machine with WMQIB 2.1 and I have some message flows that deal with backend OS/390.
Now for conversion between ASCII (on AIX) and EBCDIC (on OS/390) I am using the following scenario:

From AIX to OS/390:
1. On the MRM message, the field is binary (e.g. Transaction_Description)
2. I implemented sub flow that converts from ASCII to EBCDIC (it takes Binary in ASCII and convert it to binary in EBCDIC) and this sub flow take care of Arabic letters combinations.

From OS/390 to AIX:
In the MQInput Node I checked the conversion flag and I set the convertEncoding to 546 and convertCodedCharSetId to 819.

Both cases are working fine, but I need to improve the performance by changing the Transaction_Description filed to string in the MRM message (this will eliminate the overhead of the sub flow that converts from ASCII to EBCDIC).
Also it will eliminate another overhead in the reply flow that convert the binary in ASCII to string.

I converted the filed type (Transaction_Description) to string but unfortunately I received garbage data.

My question: is there any way to convert string fields from ASCII to EBCDIC and visa versa with out any additional coding.

Note:
Both the request and reply messages with the backend have the format "MQSTR " and the files may contain Arabic data.


Thank In advance
Alaa
-----------------------
IBM Certified Solutions Expert - WebSphere MQ Integrator
IBM Certified Specialist - MQSeries and WebSphere MQ Integrator
Back to top
View user's profile Send private message
wooda
PostPosted: Mon Feb 16, 2004 6:57 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

The MRM will do field by field conversion for encoding and ccsid.

It will convert string fields (and all numeric fields in TDS/XML format)according to the ccsid.
It will convert numeric encoded fields (CWF) according to the encoding.
It will do no conversion on binary fields.
If using CWF then the length units field will effect how lengths of string fields are calculated if the ccsid allows double byte characters.

Iyou are inputing from MQ then all you need to do is set the CCSID and ENCODING of the last header before the payload to match the data.

The incoming message will be converted to UTF-8 when it is parsed by the MRM. It is stored internally as UTF-8 and converted again on output.

If you wish to write out in a different ccsid/encoding from the input message. Then change the properties fields in the message tree using a compute node. The output node will use these values to do conversion when the message is serialized back into an MQ message.

I do not think in your case you need to change the input node properties.
Back to top
View user's profile Send private message
EgilsJ.Rubenis
PostPosted: Tue Feb 17, 2004 1:44 am    Post subject: Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Hi,

make sure channel conversion (in the channel definition) ist set to
"yes".

This makes sure that a conversion happens automatically without any coding.

cheers, egils
Back to top
View user's profile Send private message Send e-mail
JLRowe
PostPosted: Tue Feb 17, 2004 11:31 pm    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

No, enabling channel conversion is not a good idea.

This was intended for queue managers that do not support the full range of CCSID's and need to have data converted by the sending queue manager. The queue manager does not know the format of your data (only MQSI does), and therefore can only perform conversion in certain circumstances (MQFMT is PCF or MQSTR).

The standard pattern for data conversion in WMQ (and WBIMB), is 'receiver makes good', this is achieved by specifying the convert option on an MQGET, or by doing the conversion yourself (as MQSI does).
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Wed Feb 18, 2004 1:02 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

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.
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 » WebSphere Message Broker (ACE) Support » EBCDIC TO ASCII 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.