Posted: Tue Oct 11, 2005 1:59 am Post subject: ASCII to EBCDIC conversion.
Newbie
Joined: 22 Sep 2005 Posts: 3
Hi,
Can anyone please advice me about ASCII to EBCDIC conversion by MQ. Actually I am getting the message (in ASCII) from a queue but can't figure out how to convert this to EBCDIC. I understand that MQ can do this conversion but not sure how to get on with it. I am using COBOL on AS400.
I would need to convert my reply messasge (in EBCDIC) to ASCII as well before writing back to the queue.
As I understand the Options parameter of the Get Message Options structure should have GMO_CONVERT. The other two parameters CodedCharSetId and Encoding in the Message Descriptor structures need to be populated as well. I don't have a clue what these two parameters would be to get the converted message at MQGET and MQPUT. Or is there something else that needs to be done to get the message converted.
Let me know if my view is correct or is there an entirely different approach to this.
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
CCSID and Encoding are defaulted to the correct value for the platform you are running on. Provided that the Format field was set to MQFMT_STRING by the sending application, your GET with CONVERT should do the trick.
Same is true on the sending side, all you really need to do is set the Format field (and ensure the message body is all string data) and PUT the message. _________________ -wayne
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