locked
BizTalk writing Message in EBCDIC instead of ASCII to Websphere MQ RRS feed

  • Question

  • Hi,

     

    I am using BizTalk 2006 R2 to write the XML message to a IBM Websphere MQ using MQSC transport type. I have the adapter setup for it. The message is getting written in EBCDIC format instead of ASCII format. So the transaction that is waiting for the data on the Queue is failing. Can any one suggest me what settings do I need to change in order to fix this?

    Thursday, June 26, 2008 2:33 PM

Answers

  • Websphere MQ on the server side can do this conversion for you if you can have the administrator configure it for you. Here is a link on how this would be done: http://middleware.its.state.nc.us/middleware/Documentation/en_US/htm/amqzag03/amqzag031m.htm.

     

    The Websphere MQ 6 help file also mentions this:

     

    The following table lists the properties that you can set on the Extended page of the Properties for WebSphere MQ dialog.

    Property - Convert EBCDIC newline 

    Description - EBCDIC code pages contain a new line (NL) character that is not supported by the ASCII code pages (although some ISO variants of ASCII contain an equivalent). If messages are sent from a system that uses EBCDIC code pages (for example, a z/OS system) to a system that uses ASCII, you can control how the EBCDIC newline character is converted into ASCII format.
    The default value is NL_TO_LF, which means that the EBCDIC NL character (X'15') is converted to the ASCII line feed character LF (X'0A') for all EBCDIC to ASCII conversions. To convert the EBCDIC NL character according to the conversion tables on your operating system, click TABLE. Note that the results of a TABLE conversion can vary from platform to platform and from language to language; even on the same platform the results might vary if you use different coded character set identifiers (CCSIDs). To convert ISO CCSIDs using the TABLE method and use the NL_TO_LF method for all other CCSIDs, click ISO.
    Registry Stanza Key - ConvEBCDICNewline

    Also, the MQSeries (not MQSC) adapter provides the data conversion property may handle this conversion as well.

     

    Thanks,

    Thursday, June 26, 2008 7:04 PM
    Moderator

All replies

  • Hi,

     

     As far as I know, BizTalk MQ-Series Adapter didn’t support EBCDIC to ASCII conversion, but it implements the Unicode to ASCII conversion.

     

    I think you have to implement your converter, the following link could help you: http://www.yoda.arachsys.com/csharp/ebcdic/

     

    I think you have to warp the converter into a receive pipeline component that you can use it in the decoding stage in your receive pipeline.

     

    Personally I prefer to normalize the data before comes to the BizTalk-MsgBox, because you might deal with the incoming data in the future.

     

    Hope this can help you

     

     

    If you liked the idea and you create the pipeline component, please add it to the www.codeplex.com so many others can benefit from your component.

     

    -Firas

     

    Thursday, June 26, 2008 4:04 PM
  • Websphere MQ on the server side can do this conversion for you if you can have the administrator configure it for you. Here is a link on how this would be done: http://middleware.its.state.nc.us/middleware/Documentation/en_US/htm/amqzag03/amqzag031m.htm.

     

    The Websphere MQ 6 help file also mentions this:

     

    The following table lists the properties that you can set on the Extended page of the Properties for WebSphere MQ dialog.

    Property - Convert EBCDIC newline 

    Description - EBCDIC code pages contain a new line (NL) character that is not supported by the ASCII code pages (although some ISO variants of ASCII contain an equivalent). If messages are sent from a system that uses EBCDIC code pages (for example, a z/OS system) to a system that uses ASCII, you can control how the EBCDIC newline character is converted into ASCII format.
    The default value is NL_TO_LF, which means that the EBCDIC NL character (X'15') is converted to the ASCII line feed character LF (X'0A') for all EBCDIC to ASCII conversions. To convert the EBCDIC NL character according to the conversion tables on your operating system, click TABLE. Note that the results of a TABLE conversion can vary from platform to platform and from language to language; even on the same platform the results might vary if you use different coded character set identifiers (CCSIDs). To convert ISO CCSIDs using the TABLE method and use the NL_TO_LF method for all other CCSIDs, click ISO.
    Registry Stanza Key - ConvEBCDICNewline

    Also, the MQSeries (not MQSC) adapter provides the data conversion property may handle this conversion as well.

     

    Thanks,

    Thursday, June 26, 2008 7:04 PM
    Moderator
  • I am also working with the MQSC adapter for BizTalk. I use the MQ Base Client v7.0.

    Our queuemanager also uses the ebcdic coding format. I have read that when setting the character set to UTF-8 in the MQSC adapter properties on the receive location the conversion to UTF-8 would succeed.

    Unfortunately i am receiving a 2298 MQ error specifying that this function is not supported.

    Maybe i should use the v6.1 version of the MQ client? Although i think that newer versions should still support the previous functions.

    Has anyone experimented with this character set setting before? Did it work? Which MQ Client version are u using? Was the message u received in EBCDIC?

     

    Thanks in advance for any answer!


    Regards,


    Nathan M

     

     

    Tuesday, November 18, 2008 4:01 PM
  • I would be really careful using a different version of the client from what is mentioned on MSDN. Here is a link to an article that mentions the supported client version: http://technet.microsoft.com/en-us/library/aa705007.aspx. I used this client version about a year ago but am not sure what encoding was used for the queue manager on the server.

     

    Since your queue manager uses EBCDIC, you will likely need to implement the custom pipeline component like Firas mentioned above.

     

    Thanks,

     

     

    Tuesday, November 18, 2008 6:54 PM
    Moderator
  •  

    I decided to install the 6.0.2.5 MQ Client. With that i can turn on character set UTF-8 on the adapter for the BizTalk receive location. This seems to be working fine.

    I think the adapter now lets the MQ Client use the MQMO_Convert with the MQGet. This makes the client convert the messages before entering them into BizTalk.

    I also think this might be more performant than making a custom pipeline to do the conversion.

     

    Regards,


    Nathan

     

    Thursday, November 20, 2008 3:19 PM
  • Thanks for posting on success with a different version of the MQ Client. It is valuable feedback to know when more than the limited versions of the MQ Client listed on MSDN work.

     

    Thanks,

     

    Thursday, November 20, 2008 3:37 PM
    Moderator