Preparing and executing an ODBC application

You must compile, prelink, and link-edit an ODBC application before you can run it. Db2 ODBC provides sample programs to help you with program preparation.

About this task

For guidance in how to prepare and execute an ODBC application, use the following online samples, which are provided in DSN1110.SDSNSAMP:

DSN8O3VP
A sample C application. You can use this sample to verify that your Db2 ODBC 3.0 installation is correct.
DSN8OIVP
A sample C application. You can use this sample to verify that your Db2 ODBC 2.0 installation is correct.
DSNTEJ8
Sample JCL. You can use this sample to compile, prelink, link-edit, and execute the sample application DSN8O3VP or DSN8OIVP to use the non-XPLINK driver.
DSNTEJ8X
Sample JCL. You can use this sample to compile, link-edit, and execute the sample applications DSN8O3VP or DSN8OIVP to use the 31-bit XPLINK driver.
DSNTEJ8E
Sample JCL. You can use this sample to compile, link-edit, and execute the sample applications DSN8O3VP or DSN8OIVP to use the 64-bit XPLINK driver.
To use the DSN803VP or DSN8OIVP samples in z/OS® UNIX, copy DSN803VP or DSN8OIVP from the sample data set to HFS. user/db2 is considered the user's directory. For example:
oput  'DSN1110.SDSNSAMP(dsn8o3vp)' '/usr/db2/dsn8o3vp.c' TEXT