Defining the database configuration for IBM i DB2

When the Transformation map (prepared as Java executable file) runs, it will use JDBC to establish the connection to the IBM i DB2 database on your IBM i server. This connection is initiated from the server computer on which the transformation map executes.

LANSA Composer prepares the JDBC connection according to the Database Configuration that you provide as a parameter to the Transformation Map. You must define the Database Configuration with the correct details necessary to establish the particular database connection to be used.

Example Database Configuration

The following sample values assume that you are using native IBM JDBC driver to connect to the IBM i DB2 database on your IBM i server:

Database driver class

Following is the class name used with the native IBM JDBC driver:

com.ibm.as400.access.AS400JDBCDriver

Database connection string

Following is a sample JDBC connection string to connect to the IBM i DB2 database running on your IBM i server using the native IBM JDBC driver:

jdbc:as400://SYSNAME/LIBNAME;naming=sql;errors=full;date format=iso; translate binary=true

The following alternate form permits database tables from more than one library (or schema) to be used.  The JDBC connection property naming=system must specified for this to be effective:

jdbc:as400://SYSNAME;naming=system;libraries=LIB1, LIB2,*LIBL;errors=full;date format=iso; translate binary=true

 

NOTE:  The IBM Toolbox for Java comes with two JDBC drivers for the IBM i , which can be used for accessing DB2 data:

 

Further considerations

Refer also to:

Additional information and resources for IBM i DB2

Additional Considerations for Transformation Maps Using IBM i DB2