Step 4 Identify the Target Database for the Transformation Map

LANSA Composer

Step 4. Identify the Target Database for the Transformation Map

LIC003 - Create a Transformation Map

1.  Insert a Database component using either the Insert Database toolbar icon or by selecting Database from the Insert menu. To connect to the database you must identify or set up an ODBC connection.

     Note: Altova MapForce runs on your PC and so, usually, the ODBC connection described here needs to connect from your PC to the server on which your application database resides.

     Altova MapForce displays a wizard and other panels that allow you to establish the ODBC connection suitable for your server.  You need to complete these panels according to the database and drivers you are using.  Connecting to databases in Transformation Maps in the Composer User Guide contains information and examples for IBM i and Microsoft Access databases used in these tutorials:

  • For the IBM i server, the database tables are supplied and installed as *FILE objects in your partition data library, for example, LICLICLIB.
    Refer to Example Database Connections for IBM DB2 for i5/OS for examples of completing the ODBC connection to the tutorial database on your IBM i Server.
  • For the Windows server, the database tables are supplied and installed in a Microsoft Access database, TUTORIAL.mdb, in the partition execute directory:
    for example, C:\Program Files\LANSA\X_WIN95\X_LANSA\X_LIC\Execute

2.  The Select a Database, Connection Wizard will start. Select IBM DB2 and click Next to accept the IBM DB2 (ODBC) database.

3.  On the next dialog, select ODBC, and click the Next button. (Mapforce 2012 supports either JDBC or ODBC database connection while defining your map.)

4.  Then select the 'Create a new Data Source Name' option. Click the Connect button.

5.  Enter a Data Source Name of <server>_<library>, where <server> is the IBM i and <library> is the specific library which will be the default for this connection. See later note for details.

     Do not click OK at this point.

6.Click the Connection Options button and enter a default User ID:

     Click OK to close the dialog.

7.  Select the Server tab. Enter an SQL default library of <library> where <library> is the default IBM i library to be used to access the required file(s) during the Prepare Map step.

8.  Click OK to connect to the database.

9.Enter your IBM i User ID and Password and click OK.

     The Signon to iSeries dialog may be shown up to three times. Complete the login in each case.

10. When you have established your ODBC connection, the mapping tool allows you to choose the particular tables you wish to use in your transformation map:

11. Select the arrow symbol next to the first library shown, to display all the IBM i libraries in a dropdown

12. Scroll down to find the library containing the files you want to use in your transformation map. The tutorial database tables can be found in the library for the LANSA partition in which LANSA Composer was installed - for example, D11LICLIB.

13. Check the box next to files TUTORDH and TUTORDL to mark them as the files you wish to use in your Transformation Map..

     Note: With a single file selected, the Preview button will display the file fields and data. In the example shown below, the file is currently empty:

     Click OK to close the dialog.  A database component representing the selected files is inserted in the workspace for the map.

Note: When used to access IBM DB2 for i5/OS database tables, the library from which you select the files is used only for the purpose of defining the transformation map.  LANSA Composer will remove the library qualifier from the generated Java code when you prepare the transformation map.  You must setup your database configuration such that the required files can be found in the desired library at run-time - you will do this in Step 7. Set up the Database Configuration .