Application Building Guide
Consider the following points when you develop your
applications. They might help make your applications more
portable:
- On UNIX, use only the default path, /usr/lib:/lib, in
your applications. On OS/2 and Windows 32-bit operating systems, ensure
the LIB environment varible points to %DB2PATH%\lib by using:
set LIB=%DB2PATH%\lib;%LIB%. Also, create symbolic links
between the default path and the version of DB2 you are using. Ensure
that the link is to the minimum level of DB2 required by your
applications. Refer to the Quick Beginnings book for your platform for information about setting
links.
- If your application requires a particular version of DB2, code the path
that specifies the DB2 version in your application. For example, if
your AIX application requires DB2 Version 2, code
/usr/lpp/db2_02_01/lib. Ordinarily, you do not need to do
this.
- Generally, the path in your application should not point to the instance
owner's copy of the sqllib/lib directory on UNIX, or the
%DB2PATH%\lib directory on OS/2 and Windows 32-bit operating
systems. This makes applications highly dependent on specific user
names and environments.
- Generally, do not use the LIBPATH environment variable, or the LIB
environment variable on Windows 32-bit operating systems, to alter search
paths in a particular environment. The variable overrides the search
paths specified in the applications running in that environment.
Applications might not be able to find the libraries or the files that they
need.
- In DB2 Universal Database Version 6, all character array items with string
semantics have type char, instead of other variations, such as unsigned
char. Any applications you code with DB2 Universal Database Version 6
should follow this practice.
If you have DB2 Version 1 applications which use unsigned char, your
compiler might produce warnings or errors because of type clashes between
unsigned char in Version 1 applications and char in Version 6 function
prototypes. If this occurs, use the compiler option
-DSQLOLDCHAR to eliminate the problem.
- Refer to the SQL Reference for a list of incompatibilities between DB2 Universal Database Version 6 and
previous versions of DB2. Refer to the Administrative
API Reference for a list of API incompatibilities between DB2 Universal Database Version 6
and previous versions of DB2.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]