Archive for December 29th, 2010

December 29, 2010

Calling AS/400 (AS400) RPG Programs using .NET

IBM’s iSeries Client Access provides a library named cwbx.dll (you will find the DLL in this location : c:\Program Files\IBM\Client Access\Shared\ and you need to install the IBM Client – iSeries Access for Windows to find the DLL,  Install IBM iSeries Access to Windows. Also check for service packs updates if there any from this link.) , which makes it possible to call RPG programs running on an AS/400 from any Microsoft .NET application. Basically we have to call equation related enquiry and posting wrapper programs used in DB2 through our .NET application or component . There are scenarios where we may have to execute direct DB calls  as we are doing in TSQL/PLSQL instead solely depending on only Equation API enquiry calls. In such cases we have to use the same IBMDA400 data provider to establish the connection between the application and the Equation Database.

Each Posting APIs are wrapped by following ILE (Integrated Language Environment) programs as mentioned below:

  • X56H1R
  • X56HMR
  • H56HSR

In addition to the posting APIs each enquiry APIs are wrapped by an ILE program as mentioned below:

  • H46HMR

The input parameters that we should pass to the above mentioned wrappers are different to each other. In other words the parameters that we should pass for the posting programs are different than for the Inquiry program.

just refer this link for start up.

iSeries Access for Windows