Author |
Message
|
robbie |
Posted: Fri Jun 21, 2002 1:06 pm Post subject: ASCII to EBCDIC Coversion |
|
|
Newbie
Joined: 21 Jun 2002 Posts: 2
|
Howdy,
I am in need of some help in converting ASCII data to EBCDIC format. We are trying to use MQ to send data from a Windows NT server to an MVS mainframe (I am working on the mainframe part of the equation). When I perform an MQGET, the records are received perfectly, but the data is still in an ASCII format. The message descriptor that arrives with the data is telling me that the Format is MQSTR and the CCSID is 437. I am working in COBOL and using the MGGMO-CONVERT option when I execute the MQGET. The application is returning a 2110 (FORMAT-ERROR) after each call and no conversion is executed. I have tried using the default CCSID on the mainframe (which I believe is 500) and 37 (USA) in the MQMD, but neither option seems to help.
I have written a few apps to transfer data to and from AS400s, but conversion was never an issue in those cases. I am pretty sure that there is some parameter or condition that I have overlooked, but I have not been able to find any solid leads.
Any and all suggestions are welcome and will be greatly appreciated.
Thanks
Rob |
|
Back to top |
|
 |
kolban |
Posted: Fri Jun 21, 2002 2:20 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
My first guess is that the FORMAT of the message is not MQFMT_STRING.
Have the sending application set the MQMD.Format field to MQFMT_STRING prior to sending. This is used by the receving queue manager to know how to transform the incoming message. |
|
Back to top |
|
 |
mrlinux |
Posted: Tue Jun 25, 2002 7:31 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
There is one other possiblity are you sending characters that have no direct mapping for EBCDIC ??? _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
robbie |
Posted: Tue Jun 25, 2002 4:47 pm Post subject: |
|
|
Newbie
Joined: 21 Jun 2002 Posts: 2
|
We have tried sending messages that we knew did not have any special characters (including a simple repeating numeric string). We can see that the result is the hex representation of the ASCII for the related strings. I believe that setting the format to MQFMT_STRING on the MQPUT would actually solve the problem. However, we have learned that this simple solution will not do any good in our world. The story goes like this:
We are attempting to use the most current version of IP/Net (V3.5) to control the message sends and receives in our Windows NT environment. This product generates and executes the MQSeries calls in the background and only requires that you list the queue name and manager name for each interface. The downside is that all calls use the default options for every parameter in the MQMD, MQPMO and MQGMO (and the default for format is MQFMT_NONE). We contacted IP/Net and they have confirmed to us that other clients have reported the same problem and that there is not a way to override any of these options at this time (although they will look into adding this functionality in a future release of the product). NOT TOO GOOD!! Now I have to devise a method of converting my received messages into EBCDIC entirely within the MVS environment (or stop using IP/Net). I have several ideas on how to do this, but I am very willing to entertain suggestions on a good method of accomplishing the task. I will let you know how this soap opera turns out
Thanks for the help
Rob |
|
Back to top |
|
 |
mrlinux |
Posted: Wed Jun 26, 2002 4:04 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well you create a local queue for IP/Net (V3.5) then generate a second app to read the local queue and then do MQPUT with the MQFMT_STRING
to the mainframe. _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
ssanchez |
Posted: Fri Jun 28, 2002 1:21 pm Post subject: |
|
|
 Newbie
Joined: 19 Jun 2002 Posts: 7 Location: Chile
|
I believe that the best you can do is to program a Channel Exit on MVS to convert the data from ASCII to EBDIC just when the message arrives to MVS and before the message is passed to your application.
Also, the Channel Exit could be in you Windows NT, so the message can be converted from ASCII to EBDIC before it's put in the queue. _________________ Samuel. |
|
Back to top |
|
 |
|