IBM DB2 Data Source

Install the DB2 JDBC Driver

Install the DB2 JDBC driver and copy the license file into the following directory:

  • (The self-contained, single-user version of Live API Creator based on Jetty) The caliveapicreator/lib/ext directory.
Note: This package does not include DB2 JDBC driver.
  • (Tomcat) The lib directory.
For more information about the supported versions of JDBC drivers, see Supported Platforms.

Connect to a DB2 Database

Prerequisites: You know your JDBC connection information.

Connect to a DB2 database by creating your API.

For more information about creating APIs, see Create your API Project.

  1. In the connection wizard, select DB2 for z/OS or DB2 for LUW.
  2. Complete the host, port, and password fields, including the following fields, and then click Continue:

Database (for LUW)

This database value accepts double quotesUse double quotes to accept the value of mixed-case (non-standard) database value.

Location (for z/OS)

This database value accepts double quotesUse double quotes to accept the value of mixed-case (non-standard) location value.
Note: Some JVM system may have problems with specific EBCDIC code pages and the CodePage1027.jar (download from this page). Copy this JAR file into your JRE/ext directory. 

MAC OS/X:

/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/

LINUX:

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.7.amzn1.x86_64/jre/lib/ext/

Windows:

C:\Program files\Java\jreXXX\lib\ext

Schema

This database value accepts double quotesUse them to accept the value of mixed-case (non-standard) schemas name.

For example: "MySchema".

Username

This database value accepts double quotesUse double quotes to accept the value of mixed-case (non-standard) username.

You are connected to the database.

DB2 Supported Data Types

Live API Creator supports read and write of the following IBM DB2 for Linux, UNIX, and Windows data types:

Data typeModeled as...
BOOLEAN
boolean
TIMESimpleTime
TIMESTAMP
SimpleTimestamp
DATESimpleDate
BLOB
binary
CHARstring
GRAPHICsring
REALfloat
DOUBLE
double
VARCHAR
string
LONG VARCHAR
string
CLOBstring
VARGRAPHIC
string
LONG VARGRAPHICstring
DBCLOB
string
SMALLINT
integer
INTEGERinteger
BIGINT
long
DECIMALdecimal
DECFLOATdecimal or double (infinity and NaN are modeled as doubles)
DISTINCT TYPE
Modeled as the underlying type.

For more information about the data type definitions, see the IBM Knowledge Center.