Chapter 4. Deploying applications with DB2 159
For a complete introduction to these connectivity configurations, visit the DB2
Information Center:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.apdv
.cli.doc/doc/t0024166.html
4.3.4 Deploying a CLI application along with ODBC CLI driver
The general tasks for deploying a CLI application with the ODBC CLI driver are
as follows:
򐂰Prepare the redistributable driver files.
򐂰Prepare the application executable file.
򐂰Prepare the deployment package.
򐂰Deploy the package to the target system.

Preparing the redistributable driver files

The first step to deploy our application is to build a driver package for
redistribution. We obtain the redistributable file list from the license file and
generate a package based on the list.
We demonstrates this procedure using a shell script. It goes through the
redistributable file list and selects the required files to form a new package that
can be bundled together with our application.
The steps to build this package are as follows:
1. Create a working folder where you have sufficient write and read permissions.
Here we create a directory itso_cli under /tmp:
mkdir -p /tmp/itso_cli
2. Locate the license file that contains the redistributable files of the ODBC and
CLI driver. Copy and paste the file names to a new file and save it in the
working folder. In our example, we assign a meaningful name redist.txt to it.
Example 4-5 shows part of the file content.
Example 4-5 Content of redist.txt
db2trc
db2ldcfg
db2lddrg
......
......
IBMOSauthclient.so
IBMOSauthclient.so.1