Author |
Message
|
kevinf2349 |
Posted: Fri Jan 07, 2005 12:01 pm Post subject: Translating ASCII - EBCDIC |
|
|
 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 |
|
 |
EddieA |
Posted: Fri Jan 07, 2005 1:07 pm Post subject: |
|
|
 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 |
|
 |
kevinf2349 |
Posted: Fri Jan 07, 2005 1:34 pm Post subject: |
|
|
 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 |
|
 |
PeterPotkay |
Posted: Fri Jan 07, 2005 1:48 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Option 1 is our standard here..... _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Michael Dag |
Posted: Fri Jan 07, 2005 2:11 pm Post subject: |
|
|
 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 |
|
 |
kirani |
Posted: Sat Jan 08, 2005 5:23 pm Post subject: |
|
|
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 |
|
 |
Nigelg |
Posted: Sat Jan 08, 2005 11:43 pm Post subject: |
|
|
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 |
|
 |
zpat |
Posted: Mon Jan 10, 2005 4:52 am Post subject: |
|
|
 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 |
|
 |
|