Recently I was working on a very complex integration project using BizTalk Server 2010 stack. This project involved integrating with legacy IBM mainframe system. The integration involved working with BizTalk Adapter for Host Applications to call Mainframe hosted applications as part of specific processes. The application mainly involved passing parameters to this COBOL application and getting the results back. Some of the parameters and results returned contained Arabic latters and characters. Arabic is a considered a complex language which requires complex language processor which is called a Transcriber. If you are familiar with the Arabic language it needs to actions to be rendered correctly:
1- The shape of the Arabic letters changes according to their context; meaning that the way we write the latter differs depending upon which letter is before and after the letter we are writing. This phase we call the shaping phase.
2- The second phase is the reversal; Arabic language is written from right to left and hence the characters need to be reversed for it to be rendered correctly. This phase we call the reversal phase.
Usually when you are dealing with Arabic programs and languages you need to execute both these phases for correct display of the sentence. Now HIS 2010 contains a special engine that deals with complex languages such as Arabic this is the TransBIDI.dll and by default this is working as normal and performs both phases as expected.
The problem we faced while integrating with the COBOL program is that it required only the execution of the shaping phase but wanted the letters not to be reversed! Although this (for me) is a strange request and initially I started to think about some sort of customizations and complex scenarios to my surprise I have found that HIS server (starting of HIS 2004) recognized this need and provided a solution to it. Although the KB article I have found talks about the DB2 adapter I found that it applies to all HIS host adapters including the Host Application adapter. Here is an excerpt of the KB article on how to apply this hot fix.
This hotfix enables the CP420PhysicalStorage registry value. You can use this registry value to define how the OLE DB Provider for DB2 treats the string data according to the physical storage. By default, after you apply this hotfix, Host Integration Server 2004 reverses the string data that is sent to the mainframe or received from the mainframe. However, for some mainframe programs, you may not want Host Integration Server 2004 to reverse the string data.
1. Click Start, click Run, type regedit, and then click OK.
2. Locate the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Host Integration Server
3. Right-click Host Integration Server, point to New, and then click DWORD Value.
4. Type CP420PhysicalStorage as the name of the registry value, and then press ENTER.
5. Double-click CP420PhysicalStorage, type 1 in the Value data box, and then click OK.
To return Host Integration Server to the default value and reverse the string data, set the CP420PhysicalStorage registry value to 0.
The complete KB article can be found here: http://support.microsoft.com/default.aspx?scid=KB;EN-US;890353
I hope this saves someone else’s day as it saved mine