Prelinking and link-editing an ODBC application

After you compile your ODBC application, you must prelink and link-edit it before you can run it. This process is slightly different depending on whether the application is an XPLINK application, a non-XPLINK application, or a 64-bit application.

Procedure

To prelink and link-edit an ODBC application:

Depending on whether the application is an XPLINK application, a non-XPLINK application, or a 64-bit application, follow the appropriate instructions for prelinking and link-editing.

You can prelink and link-edit XPLINK applications in one step. For non-XPLINK applications, you must use two steps.

Ensure that you include the appropriate Db2 ODBC definition sidedeck as input to the prelink or link-edit step of your application. Db2 for z/OS® ODBC provides the following definition sidedecks:
  • Non-XPLINK definition sidedeck, which defines all of the exported functions to use the non-XPLINK ODBC driver. This sidedeck resides in the DSN1310.SDSNMACS data set as member DSNOCLI.
  • 31-bit XPLINK definition sidedeck, which defines all of the exported functions to use the 31-bit XPLINK ODBC driver. This sidedeck resides in the DSN1310.SDSNMACS data set as member DSNAOCLX.
  • 64-bit XPLINK definition sidedeck, which defines all of the exported functions to use the 64-bit ODBC driver. This sidedeck resides in the DSN1310.SDSNMACS data set as member DSNAO64C.
The definition sidedeck that you include in the prelink or link-edit step of your application determines which Db2 ODBC dynamic load library is used.