Step 7 Set up the Database Configuration

LANSA Composer

Step 7. Set up the Database Configuration

LIC003 - Create a Transformation Map

When the Transformation is used within a Processing Sequence, it will be executed on your server. It will use the generated jar file and this will use JDBC to connect to the database tables you have used within your Transformation. To enable this connection to execute you need to specify a database connection string for use by JDBC. This is done by creating a Database Configuration.

1.  In the Navigator, expand Configurations and select Database configurations.

2.  Select New on tool bar or right click and select New from the context menu.

a.  Enter a Database configuration ID - iiiTUTDBID (where iii is your initials).

b.  Enter a Description - such as Fred Smith Tutorial database configuration.

c.  Set the Status to Active.

3.  Enter a Database connection string.

     A connection string for an IBM i server known as MYSERVER would be:

     jdbc:as400://MYSERVER/MYLIB;naming=sql;errors=full;

     date format=iso;

     translate binary=true

     where MYSERVER is the name of the IBM i server and MYLIB is the name of the library containing the database tables you wish to access.

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

     jdbc:as400://SYSNAME;naming=system;libraries=LIB1, LIB2,*LIBL;errors=full;date format=iso; translate binary=true     The tutorial database tables can be found in the library for the LANSA partition in which LANSA Composer was installed - for example, LICLICLIB.

     The connection string for the Microsoft Access database on a Windows server  would be similar to this:

     jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=C:\Composer\Tutorial\Tutorial.mdb

4.  Enter a Database driver class.

     For an IBM i server this would usually be

     com.ibm.as400.access.AS400JDBCDriver

     For a Windows server this would usually be

     sun.jdbc.odbc.JdbcOdbcDriver

     Refer to Database Configuration and supplied example database configurations for more information and examples of JDBC connection strings and driver classes for common databases.

5.  Enter a Database user and Database password. This must be a valid user on your server which has authority to the tables you are using within your map. (When using the Microsoft Access database on a Windows server, the database user and password should not be necessary.)

     Your systems administrator will be able to provide a User ID and Password.

6.  Set Commit automatically to No.
Set Transaction isolation to None

     Your Database Configuration should now look similar to the following:

     The necessary settings for these fields depends on options used in the Transformation Map definition and in the JDBC connection string and on the JDBC driver implementation but these are usually the correct values when accessing the database tables on IBM i using the IBM-supplied JDBC driver.

7.  Save your database configuration.