Use the following steps if you do not intend to use connection strings, but instead create ODBC data sources to access datastore databases.
There are a number of different driver managers that you can use to configure an ODBC data source. These instructions are carried out using unixODBC. If you are using a different driver manager, consult the vendor instructions for creating data sources.
(This may differ depending on the version of Db2 you are running.)
[Db2] Description=Sample DB2 ODBC Database Driver=/opt/ibm/db2/dsdriver/lib/libdb20.so
[<datasource-name>] Driver = <driver-name> Server = <server-name> Port = <port-no> Database = <datastore-name>
The following is an example of an .odbc.ini configuration file contains data sources for a local Db2 database instance with two datastores.
[DB2.VSAM] Driver = DB2 Server = localhost Port = 50000 Database = VSAM [DB2.SEQFILES] Driver = DB2 Server = localhost Port = 50000 Database = SEQ