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 » Translating ASCII - EBCDIC

Post new topic  Reply to topic
 Translating ASCII - EBCDIC « View previous topic :: View next topic » 
Author Message
kevinf2349
PostPosted: Fri Jan 07, 2005 12:01 pm    Post subject: Translating ASCII - EBCDIC Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Ok this seems like it should be a breeze but....

We are sending data in a message from a Wintel platform (there in ASCII) across to a z/OS system (ergo EBCDIC).

The MD is set to MQSTR and GMO-CONVERT is being used.

Everything (as expected) is converting just fine.

Now.....some bright spark is trying to send a feild that is a packed number (ie 025C = +25). MQ is converting it to 02E0. Now I understand why this is happening (%C = \ in ASCII, \ = E0 in EBCDIC).

My question really is one of best practices. As I see it we have a coupe of options.

1) Never send packed decimal fields (my own preference) and still CONVERT on EGT
2) Drop convert on GET and manually convert everything to EBCDIC (hack spit, spit)
3) 'Reconvert' the fields we require reconverting back to ASCII and treat them as packed decimal within the program

What do other folks do about this? Would converting to UNICODE help us?

Kevin
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Jan 07, 2005 1:07 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
Would converting to UNICODE help us?

No. The packed decimal is still a field you do not want to convert, no matter what CCSID you are working in.

Option 1 is what you should strive for. It's the simplist in the long run.

And for option 2, instead of doing it all manually, write a Conversion Exit. That's what it's there for.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Fri Jan 07, 2005 1:34 pm    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Eddie

The prolme with option 2 is that we have mixed data. Character and packed in the same stream. We would have to know which was which and all that good stuff correct?

I have tried to get them to think about XML but they are saying that time is the constraint. I 'think' I have won the 'send no packed' arguement.

Thanks for the input

Kevin
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Jan 07, 2005 1:48 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Option 1 is our standard here.....
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Jan 07, 2005 2:11 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

packed decimal is not a 'common' exchangeable format as far as I know and almost a guarantee for trouble!

my philosophy is to never ever send 'platform' specific formats through messaging as you never know 'who' or 'what' is the receiver.
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kirani
PostPosted: Sat Jan 08, 2005 5:23 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Also, dont set the message format to MQSTR if the message contains Binary data.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Nigelg
PostPosted: Sat Jan 08, 2005 11:43 pm    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

You could create a user-defined format, and write your own data-conversion exit. It is really qujite easy, and explained in detail in the APG.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Jan 10, 2005 4:52 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Is it possible to have a two section message, with MQSTR data and binary data in the same message?

I ask this because we would like to send XML string together with binary image data in the same message and would want the XML data converted according to CCSID but not the image data.

I thought it was just a matter of having multiple MQRFH2 headers?

In this case - the packed decimal data could be behind another header.

However why send Packed Decimal at all?

Convert it to an unpacked format before sending the message - otherwise it will always be a problem to deal with - another mainframe excepted (in which case you don't need to convert the message data).
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 » Translating ASCII - EBCDIC
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.