Building Applications for UNIX** Environments
Consider the following points when you develop your
applications. They might help make your applications more
portable:
- Use only the default path /usr/lib:/lib in your applications, and
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 Quick Beginnings for
UNIX 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. This makes applications
highly dependent on specific user names and environments.
- Generally, do not use the LIBPATH environment variable 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 5, 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 5
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 5 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 5 and
previous versions of DB2. Refer to the API
Reference for a list of API incompatibilities between DB2 Universal Database
Version 5 and previous versions of DB2.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]