AS400 / iSeries and .NET (ADO.NET)

copyied from: http://morewally.com/cs/blogs/wallym/archive/2006/06/27/87.aspx
I have been working with writing an interpretor for converting AS400 graphics to create images in .NET.  There is an RPG program out on the AS400 / iSeries that generates the necessary files.  There are a couple of things that I have found out.
  • You can use named parameters to call a stored procedure using V5R3 of the IBM Client Access Software.
  • If you get an error like: "The stored procedure cannot be found in SYSPROCS.  Unable to derive parameters."  This most likely means that the necessary stored procedure to map the RPG program to an iSeries DB2 stored procedure is not there.  Basically, if you can't see it in the IBM Operations Navigator, it doesn't exist.  You will need to set that up.  This may also be the case if you don't have the proper security to get at the stored procedure. Another common error that we got that was similar to the error above is:
    SQL0204 OER4016A in DIST4000C type *N not found.
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: IBM.Data.DB2.iSeries.iDB2SQLErrorException: SQL0204
    OER4016A in DIST4000C type *N not found.


  • The iSeries uses a different set of terminology than Sql Server, Oracle, and other traditional client server databases.  This is due to its legacy of being around before the widespread use of the sql language.  As a result, the terminology is different.  There are several items of interest to not.  A "file" is a table.  A "library" is a database.  And on and on.
  • Remember that you are going through the database subsystem when you use the iSeries .NET Data Provider.  As a result, if you can't see things there or do things, you can't do anything.
Link to the IBM ADO.NET document for their driver.

No Comments