Compiling non-XPLINK applications

If your application does not need to use z/OS® XPLINK function linkage and is not written for 64-bit addressing, use the ODBC non-XPLINK driver and compile your application as a non-XPLINK application.

Procedure

To compile non-XPLINK applications:

Perform one of the following actions:
Option Description
Non-XPLINK ODBC application in z/OS Specify the NOXPLINK compile option.

For an example of a non-XPLINK compile job, see the DSNTEJ8 online sample in DSN1310.SDSNSAMP.

Non-XPLINK ODBC C application in z/OS UNIX System Services Use the c89 compile command and specify the -W 'c,dll' compile option. (The 'dll' option enables the use of the Db2 ODBC driver for C applications.)

For example, to compile a C application that is named dsn8o3vp.c that resides in the current working directory, use the following c89 compile command:

c89 -c -W 'c,dll,long,source,list' -
 -I"//'DSN1310.SDSNC.H'" \
 dsn8o3vp.c
ODBC C++ application in z/OS UNIX System Services Use the cxx compile command with the -W 'c' compile option

For example, to compile a C++ application that is named dsn8o3vp.c that resides in the current working directory, use the following cxx compile command:

cxx -c -W 'c,long,source,list' -
 -I"//'DSN1310.SDSNC.H'" \
 dsn8o3vp.c