• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Use System Naming Convention and Library List with .NET Managed Provider

    October 13, 2004 Michael Sansoterra

    The iSeries .NET managed provider, first released in iSeries Access V5R3, lacked the ability to specify a library list and the SQL naming convention in connection strings. We were stuck with the defaults. However, with the introduction of service pack SI15176, in early September, IBM has enhanced the provider to set the library list and naming convention in the connection string.

    For those unfamiliar with the concept of a managed data provider, it is .NET’s plug-in equivalent to an ODBC driver in the Windows world or a JDBC driver in the Java world. Each database manufacturer creates a .NET provider to let .NET programs access data from their respective database. While .NET programs can use ODBC and OLE DB data sources, a database provider written specifically for .NET will perform better because special calls don’t need to be made to execute code written outside of the .NET framework (which is the case when using ODBC and OLE DB data access.)

    Below is a C# example of establishing a connection using the two new properties:

    
    private void ReadData()
    { 
          //
          // Naming Convention Values:  System 
          //                            SQL
          //
          iDB2Connection connDB2=new iDB2Connection( 
                  "DataSource=your400.yourcompany.com;" + 
                  "userid=MIKE;password=MYPASSWORD;" +
                  "LibraryList=*USRLIBL;Naming=System");
    
          iDB2Command cmdDB2=new iDB2Command(
                  "Select * From DataFile",
                   CommandType.Text, connDB2);
    
          iDB2DataReader drDB2;
    
          connDB2.Open();
          drDB2=cmdDB2.ExecuteReader();
    	  while(drDB2.Read())
          {
                       // Do something here
          }
          drDB2.Close();
          connDB2.Close();
    }
    

    The two new property names in the connection string are LibraryList and Naming. Unfortunately, the Programmer’s Toolkit help file was not updated with these new properties, so here is a brief explanation of each.

    LibraryList accepts a comma delimited list of libraries. Additionally, the *USRLIBL keyword can be specified to indicate the user library list should be used (the user library list will be inherited from the job description of the user ID used to establish the connection). Further, *USRLIBL can be used as a place holder for adding additional libraries. For example, LibraryList=*USRLIBL,TESTDATA will add the library TESTDATA after the user library list. Likewise, specifying LibraryList=TESTDATA,*USRLIBL will place TESTDATA first in the library list. As far as I can tell, this functionality is identical to the iSeries Access ODBC driver’s ability to set the library list.


    Naming accepts a value of System to indicate the system naming convention should be used, and SQL to indicate that the SQL naming convention should be used (SQL is the default). The basic difference between the two is the separator character and the system convention’s ability to use the library list for unqualified table names.

    For those of us getting to speed on .NET, IBM has made life easier because we don’t have to worry about some of the complexities of SQL programming using the SQL naming convention.

    For more information on these new properties, see the “ReadMeSP.txt” file that comes with SI15176.

    Michael Sansoterra is a programmer/analyst for i3 Business Solutions, an IT services firm based in Grand Rapids, Michigan. Click here to contact Michael Sansoterra by e-mail.

    Editor’s Note: Lorie DuBois, the developer responsible for the DB2 UDB .NET Data provider for iSeries, at IBM Rochester, had a clarification of the following sentence: “As far as I can tell, this functionality is identical to the iSeries Access ODBC driver’s ability to set the library list.” According to DuBois: “Our functionality is almost the same as the ODBC driver’s. The difference is with how we handle the Default Collection property. With ODBC, they add the Default Collection property to the library list. The .NET provider chose not to do this. With the .NET provider, if you want the Default Collection library in the library list, you must specifically include it.”

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    ARCAD Software

    [Live Webinar] Rewrite your Synon in Java? It could be… a mistake!

    Converting from Synon CA 2E to a modern language? There are many good reasons to take this step. Beyond the critical shortage of Synon skills, applications developed in this 4GL environment can no longer take advantage of key technology advances in the IBM i operating system. And though a leader in its day, the Synon CASE tool is incompatible with modern DevOps practices and concurrent development.

    Do you think the best way to move away from Synon CA 2E is by rewriting everything in Java?

    Think again. A full rewrite is risky, expensive, and slow — often leading to years of redevelopment and countless functional regressions.

    Join Philippe Magne, CEO of ARCAD Software and Ray Bernardi, senior solution architect to learn why a conversion to Free Form RPG is a risk-free and high-performance option that leverages the architecture of the original Synon application – retaining all the reliability and security advantages of the host platform.

    In our Webinar, we will share a secure, automated migration path for business applications developed in Synon CA 2E:

    • 100% automated conversion to modern Free Form RPG and DDL (SQL)
    • Guaranteed conversion accuracy with test automation process
    • Possible modernization of the user interface during the project
    • Risk free, fixed price Modernization as a Service (MaaS)
    • Modern full DevOps framework for delivery

    Leverage the competitive advantage within your Synon application.

    Register Today!

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    BOSaNOVA and Wyse Look to the High End of Thin Clients IBM Completes i5 Squadrons with 64-Way Model 595

    Leave a Reply Cancel reply

Volume 4, Number 34 -- October 13, 2004
THIS ISSUE
SPONSORED BY:

T.L. Ashford
ProData Computer Svcs
WorksRight Software

Table of Contents

  • Anatomy of a P-Field
  • Use System Naming Convention and Library List with .NET Managed Provider
  • Handling Oversized Numbers Gracefully

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Bang For The Buck On Entry Power10 And Power11 Machines
  • A Hardware Refresh Is The Perfect Time To Re-Evaluate Your HA/DR Strategy
  • Fresche Taps AI For New RPG-To-Java Conversion Tool
  • Gartner Raises 2025 IT Spending Forecast, Puts Out 2026 Prediction
  • IBM i PTF Guide, Volume 27, Number 45
  • EvolveWare Makes Progress With RPG Code Modernization Using AI
  • Why The IBM i Market Needed Another VTL Option
  • What Price Power?
  • Cloud Revenues Saved By The GenAI Boom
  • IBM i PTF Guide, Volume 27, Number 44

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle