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 Java / JMS » Ebcdic to Ascii sample

Post new topic  Reply to topic
 Ebcdic to Ascii sample « View previous topic :: View next topic » 
Author Message
wmq_guy
PostPosted: Thu Oct 21, 2004 10:39 am    Post subject: Ebcdic to Ascii sample Reply with quote

Acolyte

Joined: 21 Oct 2004
Posts: 50

I looked at some other posts on this subject, but did not come away with what I needed.

Although MQ has the ability to convert a message that was sent from os400 to windows, I have been instructed not to use this functionality...

what are the necesssary steps to achieve this?


Last edited by wmq_guy on Tue Oct 26, 2004 1:38 pm; edited 2 times in total
Back to top
View user's profile Send private message
nathanw
PostPosted: Thu Oct 21, 2004 10:41 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

easy question

why have you been told not to use it?
Back to top
View user's profile Send private message MSN Messenger
EddieA
PostPosted: Thu Oct 21, 2004 10:59 am    Post subject: Reply with quote

Jedi

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

Quote:
what are the necesssary steps to achieve this

Ensure your message is all "character" data. Use MQSTR as the Format. Make sure the GET has GET_WITH_CONVERT.

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
wmq_guy
PostPosted: Thu Oct 21, 2004 11:16 am    Post subject: Reply with quote

Acolyte

Joined: 21 Oct 2004
Posts: 50

I would like to use the MQ_STR and convert, but as I said..it's not an option because all the data is not char..
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Oct 21, 2004 11:24 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If the data isn't all character, then don't use MQSTR. MQSTR tells WMQ what kind of data is in the message so that it can convert it. It sounds like you need to supply your own format and then a conversion exit to convert the data.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
wmq_guy
PostPosted: Thu Oct 21, 2004 11:37 am    Post subject: Reply with quote

Acolyte

Joined: 21 Oct 2004
Posts: 50

I apologize, but I am completely confused by your answer.
A conversion exit? Can you elaborate?

It is hard to imagine I would be the first person to try this.

thank you kindly
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Oct 21, 2004 12:45 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Sorry about that. I should have given more info. Your interested in Chapter 11 of the Application Programming Guide. Basically, you fill in the MQMD Format with the name of your exit. You then write this exit (a sample skeleton is provided). When WMQ gets a message, it looks at the Format and then calls your routine to convert the data.

To be honest, I've known some people that feel like it is better to just convert their data to be all character, use MQSTR, and let WMQ do the converting. This probably depends on how much non-character data you are trying to send.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kirani
PostPosted: Thu Oct 21, 2004 10:32 pm    Post subject: Reply with quote

Jedi Knight

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

wmq_guy wrote:
I would like to use the MQ_STR and convert, but as I said..it's not an option because all the data is not char..

Can you explain what do you mean by non-char data? Where is your sending application residing? By non-char fields we are referring to BINARY data, for example, COMP-3 fields on M/F.
_________________
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: Thu Oct 21, 2004 11:50 pm    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

If you want to do it programmatically yourself in C, you need to read up on the iconv_open() and iconv() library functions.
iconv_open() opens a converter, and iconv() converts the data.
The syntax is quite easy.
Back to top
View user's profile Send private message
wmq_guy
PostPosted: Fri Oct 22, 2004 11:55 am    Post subject: Reply with quote

Acolyte

Joined: 21 Oct 2004
Posts: 50

yes, binary data.
This tasks seems very daunting.

an MDB is pickup this ebcidic tran off a mq queue.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Oct 22, 2004 2:13 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Tell the MF app to move all those COMP-3s into PIC-9 fields, and then send the message with MQSTR in the format. This is the easiest way to solve this problem.

A regular MQGET with convert will then work just fine on that data on any other platform.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
wmq_guy
PostPosted: Tue Oct 26, 2004 12:52 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Oct 2004
Posts: 50

<edited>

check out the post below.


Last edited by wmq_guy on Tue Oct 26, 2004 1:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Oct 26, 2004 1:16 pm    Post subject: Reply with quote

Jedi

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

If your message contains any non-character data (binary integers, comp-3), then this code will scramble them just as effectively as MQSeries.

If the data is not character, then you have to translate it field by field knowing what kind of data each field is.

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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Ebcdic to Ascii sample
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.