Author |
Message
|
vam |
Posted: Wed Nov 10, 2010 10:02 am Post subject: Convert EBCDIC to ASCII format |
|
|
Acolyte
Joined: 16 Mar 2010 Posts: 70
|
I had a requirement in which I need to convert data from EBCDIC format to ASCII format in message broker.I was new to it
Could you guide me ?
regards,
Vam |
|
Back to top |
|
 |
vam |
Posted: Wed Nov 10, 2010 10:25 am Post subject: Convert EBCDIC to ASCII format |
|
|
Acolyte
Joined: 16 Mar 2010 Posts: 70
|
I need the above mentioned covertion to be done in message flow itself. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 10, 2010 11:12 am Post subject: Re: Convert EBCDIC to ASCII format |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vam wrote: |
I need the above mentioned covertion to be done in message flow itself. |
And the part of the broker InfoCenter titled Converting code page and message encoding didn't seem helpful, useful or relevant?
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 10, 2010 11:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
And don't double post!
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
vam |
Posted: Wed Nov 10, 2010 12:08 pm Post subject: Convert EBCDIC to ASCII format |
|
|
Acolyte
Joined: 16 Mar 2010 Posts: 70
|
I have read it but I didnt understand like if we just set the header properties like below, will it change EBCDIC to ASCII?
1.SET OutputRoot.MQMD.CodedCharSetId = 437;
2.SET OutputRoot.MQMD.Encoding = 546;
Any inputs? please. |
|
Back to top |
|
 |
zpat |
Posted: Wed Nov 10, 2010 12:12 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
First of all MQ itself will convert incoming messages, if you tick the convert option on the MQinput node (which is just a MQGET).
Otherwise the broker will convert the message data anyway to Unicode for use inside the message flow.
You can set the desired output codepage (and I assume the broker converts it when the MQOutput node is reached).
There is no need to explicity convert the data inside a message flow. A properly written flow can handle message data in different code pages without any programming changes.
Last edited by zpat on Wed Nov 10, 2010 1:11 pm; edited 1 time in total |
|
Back to top |
|
 |
vam |
Posted: Wed Nov 10, 2010 12:54 pm Post subject: Convert EBCDIC to ASCII format |
|
|
Acolyte
Joined: 16 Mar 2010 Posts: 70
|
Thanks for your information.
In my scenario, I will get fixed width file data in EBCDIC format where i need to convert the data from EBCDIC to ASCII and send it to target queue. There is no transformation logic in data needed and it is just passthrough.
As you said if I tick the convert option on the MQ input node then do i need to create message set with MRM domain for that fixed width file or can I take it as BLOB and configure it in MQinput node properties?
 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 10, 2010 1:00 pm Post subject: Re: Convert EBCDIC to ASCII format |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vam wrote: |
As you said if I tick the convert option on the MQ input node then do i need to create message set with MRM domain for that fixed width file or can I take it as BLOB and configure it in MQinput node properties? |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 10, 2010 1:07 pm Post subject: Re: Convert EBCDIC to ASCII format |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
vam wrote: |
Thanks for your information.
In my scenario, I will get fixed width file data in EBCDIC format where i need to convert the data from EBCDIC to ASCII and send it to target queue. There is no transformation logic in data needed and it is just passthrough.
As you said if I tick the convert option on the MQ input node then do i need to create message set with MRM domain for that fixed width file or can I take it as BLOB and configure it in MQinput node properties?
 |
If your message is text only, and has the MQFMT_STRING format value, the conversion can be done at MQ level.
However if the message is mixed content (numeric and text) you will have to parse it before sending it to its destination and convert in the flow using OutputRoot.Properties.CodedCharSetId.
If the format has not been set and the message is text only you can define it as a BLOB, but you will still have to convert from BLOB to CHAR to BLOB in order to get the CCSID right... This does not relieve you from the task of setting the output CCSID in properties....
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|