Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


AS-400 ODBC driver

Posted on 2000-02-28
Medium Priority
Last Modified: 2012-06-27
As part of our project, a VB6 application from Oracle/AIX setup has to update data in DB2/400 on AS/400.
I would like to know :
Is it possible to have an ODBC connection to DB2/400 ?
Where I can get the driver and how to do the configuration?

Please reply in detail, Thanks in advance.
Question by:ajit11
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 2567368
Addressing your questions in order:

>Is it possible to have an ODBC connection to DB2/400 ?

Yes it is. For instance IBM´s Visual Age for Java, Enterprise editions comes with an ODBC driver for DB2. Aditionaly, Visual Ages Toolkit 400 comes with several alternatives to access a Database on the AS400, most via Client Access. (although this second aspect is only interesting in your case since you are looking for VB solutions).

Although I don´t know this for a fact, I would assume that Visual Age for C++ Enterprise Edition  

should contain such a driver and would be a better tool for a VB6 developer.

>Where I can get the driver and how to do the configuration?

As to where to get the driver, the obvious first choice is dirrect from IBM. another driver vendor you may want to look at is Inprise, at:


As to configuration, that depends on the actual driver you purchase. Some older drivers used Novel or OS/2 as gateways and depended heavily on network configurations. Others, thar rely on client access will be esier to configure but rather slow. Driver that run over Toolkit 400 are faster but harder to get running properly.

IBM's ODBC driver establishes the connection over TCP/IP although they report they will be (or have) be changing to livewire in the near future.


Expert Comment

by:Ron Warshawsky
ID: 2576521

  Jpk provided you with some information. However I do have a better answer with the detailed instructions on getting right software from IBM and establishing connection to AS-400.


Expert Comment

ID: 2578331

I have only installed and used java on an AS400 once, and that was with SQL400, not DB2. If you have a better answer then by al means post it :-)

Im withdrawing my answer to the comment level. Post your answer and let ajit11 choose whats best.

Accepted Solution

Ron Warshawsky earned 600 total points
ID: 2578638

  Thanks for letting me post answer on this question.


Here are the necessary steps to establish ODBC connection to DB2.

1. Download from IBM site (or use CD if you have one) DB2 connect personal edition. It can be found at http://www-4.ibm.com/software/data/db2/udb/downloads.html.

2. Install DB2 Connect personal edition on the client machine.

3. After installation run Client Configuration Assistant (CCA) application (found in the DB2 for Windows 98/NT folder)

4. Add a AS/400 database to your system

Step 1.
  Select Manually configure a connection to a DB2 database radio button and click on the Next push button

Step  2.
 Select the radio button that corresponds to the location where you would like your DB2 directories to be maintained.

Step  3.
 Select the radio button that corresponds to the protocol that you want to use from the Protocol list (I assume you using TCP/IP) and click on the Next push button.

Step  4.
 Enter the required communication protocol parameters and click on the Next push button. For more information, click on the Help push button.
Step  5.
 Enter the database alias name of the remote database that you want to add in the Database name field and a local database alias name in the Database alias field. Add a comment that describes this database in the Comment field and click on the Next push button.

If you are adding a database that resides on a AS/400 system, the Database name field will appear as follows:  
AS/400 RDB name

Step  6.
 Register this database as an ODBC data source.

Ensure that the Register this database for ODBC check box is selected.

Select the radio button that describes how you would like to register this database:

If you would like all users on your system to have access to this data source, select the As a system data source radio button.

If you would like only the current user to have access to this data source, select the As a user data source radio button.

If you would like to create an ODBC data source file to share database access, select the Create a file data source check box and enter the path and filename for this file in the File data source name field.

Click on the Optimize for application drop down box and select the application for which you want to tune the ODBC settings.

Click on the Done push button to add the database that you selected. The Confirmation window opens.

You can also select the Node Options tab, the Security Options tab, or the Host or AS/400 Options tab (if you are adding a host or AS/400 database) to specify more detailed catalog information.

Step  7.
 Click on the Test Connection push button to test the connection. The Connect to DB2 Database window opens.

Step  8.
 Enter your user ID and password and click on OK. If the connection is successful, a message confirming the connection appears.
Step  9.
 You are now able to use this database. To finish using the Add Database SmartGuide, click on the Close push button; you can then add more databases by clicking on the Add push button or exit the CCA.

  When you have finished adding the host or AS/400 database to your system, it is recommended to bind any DB2 utilities or applications to the database you just added by performing the following steps:

Step  1.
 Log on to the system with a user ID that has System Administrative (SYSADM), Database Administrative (DBADM), or Bind Add (BINDADD) authority on the database.
Step  2.
 Start the CCA.
Step  3.
 Select the database that you want to bind the utilities and packages against.
Step  4.
 Click on the Bind push button.
Step  5.
 Select the type of bind that you want to perform:

Select the Bind DB2 utilities radio button if you want to bind utilities against the database

Select the Bind applications radio button if you want to bind applications against the database
Step  6.
 Click on the Continue push button.
Step  7.
 Enter a user ID and password to connect to the database.
Step  8.
 Select the utilities or applications that you want to bind and click on OK.

Please, let me know, if you have any installation questions or server side configuration details.



Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question