Follow these steps:
1.Unzip the zip file containing the IBM DB2 ODBC driver.
For your convenience, you can go here to download the latest DB2 ODBC drivers:
2.Important: Don’t run now any executable that originates from the ZIP file: First and before, you have to move the extracted content of the zip file to the final destination folder: Typically, you’ll have:
On a 64-bit system for a 64-bit ODBC driver: Copy the files into “C:\Program Files\IBM”
On a 64-bit system for a 32-bit ODBC driver: Copy the files into “C:\Program Files (x86)\IBM”
On a 32-bit system for a 32-bit ODBC driver: Copy the files into “C:\Program Files\IBM”
For example, on my 64-bit system (and 64-bit ODBC driver), I will have the following files:
3.Open an “Administrator Command Prompt” (right-click on the command prompt and choose "Run as administrator"), go to the install folder (e.g. “c:\program files\IBM\bin”) and type:
Here is an illustration of the procedure:
The procedure to create a Type 1 ODBC connection to IBM DB2 is the following:
1.Open the “Microsoft ODBC Administrator” (see the section 18.104.22.168. to have more details on how to open the “Microsoft ODBC Administrator”)
2.Click the "Add…" Button to create a new ODBC DSN:
3.Choose the DB2 ODBC-driver and press the Finish-button:
4.Give now the “ODBC DSN Link name” that you’ll use inside Anatella to select the connection to your DB2 database. Here I have just given it the name DB2DB.
5.Click the “Add” Button:
6.Go to the Advanced Settings-tab and press the “Add” button here several times: i.e. you need to “add” the following settings:
oDatabase: Should point to the database that you want to connect to.
oHostname: Should point to the server where your DB2-server is installed.
oPort: The portnumber where the DB2-server on the Hostname is responding.
oProtocol: The protocol used to connect to the DB2-server (most of the time, select TCP/IP) .
The final settings should be something like this:
7.Click the “OK” button here and you are done!
Inside Anatella, all the characters are Unicode. This means that Anatella can handle any characters (e.g. any Chinese chars, any Cyrilic chars, any accentuated chars).
By default, inside DB2, the fields that are declared as “VARCHAR()” are not Unicode. For example, this means that DB2 will report an error if you use Anatella to insert any accentuated character (such as é,è,à,…) inside a “VARCHAR()” field. The solution is to never use any “VARCHAR()” fields and always use “VARGRAPHIC()” fields instead (when you declare a new field containing some characters inside a “CREATE TABLE” statement). More details: The “VARGRAPHIC()” fields are Unicode and can accommodate any character that Anatella might want to INSERT.
To remind you: The CreateTable automatically generates a “CREATE TABLE” statement based on the data contained inside the table to INSERT inside the database. Unfortunatelly, by default, inside the auto-generated “CREATE TABLE” statement, all the columns that contain some characters are declared as “VARCHAR()” and not “VARGRAPHIC()”: i.e. This won’t work properly inside DB2. This means that you must manually edit the auto-generated “CREATE TABLE” statement to replace all “VARCHAR” strings with the “VARGRAPHIC” string. Alternatively, instead of manually editing the “CREATE TABLE” statement, you can use the following JS code inside the “For Expert Users” panel of the CreateTable Action: