IBM DB2 Computer Accessories User Manual


 
160 DB2 Deployment Guide
3. Ensure that the ODBC CLI driver file is ready. It could be downloaded from
the IBM Web site. See also 4.1.2, “IBM Data Server Driver for ODBC, CLI,
and .NET, and IBM Data Server Driver for ODBC and CLI” on page 143.
Grant the necessary read permission to the driver file and ensure that the
user account you are using can access it without any problems.
4. Create a script file named bldpkg under the working folder. It is used to help
us build the package. Example 4-6 contains the complete coding.
Example 4-6 Script file bldpkg
#!/usr/bin/ksh
##########################################################################
#
# build an ODBC and CLI driver package for redistribution
#
# bldpkg -d drv_odbc_cli -r filename -o output_pkg
#
# -d DB2 Driver file for ODBC and CLI. It has suffix tar.gz or tar.Z
# -r Specify a file which consists of file names that can be used
# for redistribution
# -o Generate a new package will be deployed along with application
#
# example: bldpkg -d v9.5_linuxx64_odbc_cli.tar.gz -r redist.txt -o odbc_cli
#
##########################################################################
# command-line syntax
syntax()
{
echo "
bldpkg -d drv_odbc_cli -r filename -o output_pkg
-d DB2 Driver file for ODBC and CLI. It has suffix tar.gz or tar.Z.
-r Specify a file which consists of file names that can be used
for redistribution
-o Generate a new package will be deployed along with application
example: bldpkg -d v9.5_linuxx64_odbc_cli.tar.gz -r redist.txt -o odbc_cli
"
}
# main program
# process command-line options
case $# in
0) syntax
exit 1;;
*)
while getopts "d:r:o:" OPT;
do
case $OPT in
d) CLIDRV_FILE=$OPTARG ;;