Application Building Guide
The information in this chapter applies to more than one operating
system. The majority of the topics apply to most DB2-supported
platforms.
For the latest DB2 application development updates, visit the Web page
at:
http://www.ibm.com/software/data/db2/udb/ad
General Points for Building and Running DB2 Programs
- Application Environment:
- OS/2: if you set your environment variables by a command file rather
than in the CONFIG.SYS file, you must build your applications in the
same window.
- UNIX: you must build and run DB2 applications from a shell where
your environment variables are set. Depending on the shell you are
using, you can do this by running db2profile or
db2cshrc.
- Windows 32-bit operating systems: you must build your applications
in a DB2 command window. Refer to "Setup" for more information.
- To build DB2 programs containing embedded SQL, or to run any DB2 programs,
the database manager on the server must be started. To start the
database manager, you need SYSADM (system administration) authority.
Refer to Quick Beginnings for information on SYSADM authority.
Start the database manager (if it is not already running) by entering the
following command on the server:
db2start
- When you are building applications for production, the DB2 runtime paths
that are built into the executables should be the install paths, and not the
paths of the local DB2 instance where you are developing your
applications. This book is designed to show you how to build
applications in a development environment, and therefore documents the
instance copies of sqllib/include and sqllib/lib on
UNIX, and %DB2PATH%\include and %DB2PATH%\lib on OS/2
and Windows 32-bit operating systems.
- It is recommended that, before altering or building the sample programs,
you copy the samples of the language you will be using from
sqllib/samples on UNIX, or from %DB2PATH%\samples on
OS/2 or Windows 32-bit operating systems, to your own working
directory. This allows you to preserve the original samples in case you
need to refer to them in the future.
[ Top of Page | Previous Page | Next Page ]