Executing an ODBC application
You can execute an ODBC application by using a z/OS® job or by using z/OS UNIX commands.
Procedure
To execute an ODBC application:
- For applications that you want to execute on z/OS: Use one of the execution jobs in the
following samples inDSN1210.SDSNSAMP as
a model:
- DSNTEJ8
- Shows how to execute non-XPLINK applications
- DSNTEJ8X
- Shows how to execute 31-bit XPLINK applications.
- DSNTEJ8E
- Shows how to execute 64-bit XPLINK applications.
- For applications that you want to execute on z/OS UNIX System Services: Include
the DSN1210.SDSNEXIT
and DSN1210.SDSNLOAD
data sets in the data set concatenation of your STEPLIB environment
variable. You can set the STEPLIB environment variable in your
.profilewith the following statement:export STEPLIB=DSN1210.SDSNEXIT:DSN1210.SDSNLOAD - For all ODBC applications: Ensure that your application
can access the following items:
- The DSN1210.SDSNLOAD
data set
The SDSNLOAD data set contains both the Db2 ODBC dynamic load library and the attachment facility module that is used to communicate with Db2.
- Any site-specific DSNHDECP
The Db2 for z/OS load module DSNHDECP contains, among other things, the coded character set ID (CCSID) information that Db2 for z/OS uses.
A default DSNHDECP is shipped with Db2 for z/OS in the DSN1210.SDSNLOAD data set. However, if the values that are provided in the default DSNHDECP are not appropriate for your site, a new DSNHDECP can be created during the installation of Db2 for z/OS. If a site-specific DSNHDECP is created during installation, you should concatenate the data set that contains the new DSNHDECP before the DSN1210.SDSNLOAD data set in your STEPLIB or JOBLIB data definition statement.
- The DSN1210.SDSNLOAD
data set
- For
31-bit XPLINK applications and 64-bit applications: To use the
31-bit XPLINK driver or the 64-bit driver, you must perform the following
actions:
- Include z/OS Language Environment® libraries SCEERUN and SCEERUN2 run time libraries in the application's STEPLIB, JOBLIB, LPALST, or LNKLST concatenation. For z/OS UNIX, ensure that these run time libraries are qualified with the prefix that the _C89_PLIB_PREFIX or _CXX_PLIB_PREFIX environment variable specifies.
- Ensure that the application can access the XPLINK dynamic link library DSNAOCLX in the DSN1210.SDSNLOD2 data set at execution time.
- For 31-bit applications, ensure that the application can access the XPLINK dynamic link library DSNAOCLX in the DSN1210.SDSNLOD2 data set at execution time.
- For 64-bit applications, ensure that the application can access the 64-bit dynamic link library DSNAO64C in the DSN1210.SDSNLOD2 data set at execution time.
- For non-XPLINK applications that use the XPLINK driver, specify the XPLINK(ON) Language Environment run time option to allocate XPLINK resources.