Solved

AS-400 ODBC driver

Posted on 2000-02-28
4
977 Views
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.
0
Comment
Question by:ajit11
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:jpk041897
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  
http://www-4.ibm.com/software/ad/as400/library/vacpp44.html

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:

http://www.borland.com/devsupport/sqllinks/pub-31.html

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.



0
 
LVL 3

Expert Comment

by:rwarsh
ID: 2576521
ajit11,

  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.

Regards,
  rwarsh
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 2578331
rwarsh,

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.
0
 
LVL 3

Accepted Solution

by:
rwarsh earned 200 total points
ID: 2578638
jpk,

  Thanks for letting me post answer on this question.

ajit,

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.

Regards,
  rwarsh



0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Read about achieving the basic levels of HRIS security in the workplace.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now