Db2 ODBC application requirements
To successfully build an ODBC application, you must ensure that the correct compile, prelink, and link-edit options are used. In particular, your application must generate the appropriate DLL linkage for the exported Db2 ODBC DLL functions.
Db2 ODBC applications have the following requirements:
- You must use a C or C++ compiler to compile the application. If
you use a C compiler, you must specify the DLL compiler option.
The C++ compiler always generates DLL linkage. However, the C compiler generates DLL linkage only if the DLL compile option is used. Failure to generate the necessary DLL linkage can cause the prelinker and linkage editor to issue warning messages for unresolved references to Db2 ODBC functions.
- Language Environment® base services must be installed on the subsystem or data sharing member.
- Applications
must use the corresponding ODBC driver for the addressing mode in
which they are running.
Db2 ODBC applications can be written for either 31-bit addressing mode, AMODE(31) or 64-bit addressing mode, AMODE(64). 31-bit applications must use the 31-bit ODBC driver; they cannot use the 64-bit ODBC driver. Likewise, 64-bit applications must use the 64-bit driver; they cannot use the 31-bit ODBC driver.
Restriction: Although 64-bit mode provides larger addressable storage, the amount of data that can be sent to or retrieved from Db2 by an ODBC application is still limited by the amount of storage that is available below the 2-GB bar. Therefore, for example, an application cannot declare a 2 GB LOB above the bar and insert the entire LOB value into a Db2 LOB column.
For ODBC applications that are built on z/OS® UNIX, you do not need to copy the Db2 ODBC product file to HFS. You can directly reference the non-HFS Db2 ODBC data sets in the c89 compile command.