© Copyright IBM Corp. 2008. All rights reserved. 259
Appendix A. Sample applications
This appendix provides the application codes of various languages used in
demonstrating the DB2 application deployment as well as deploying
pre-configured database.

A.1 C/C++

Example A-1 shows the application used to demonstrate the deployment of the
DB2 C/C++ application.
Example: A-1 Sample CLI application
/****************************************************************************
**
** A sample CLI application which makes DSN-less connection to database.
** Database connectivity informations are read from command line arguments.
**
*****************************************************************************
** Build the application:
**
** There are two approaches to build this applicaiton:
** 1. use bldapp script that is included in DB2 installation
** 2. use recommended compile and link options according to DB2 information
center:
A