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:
  • To compile a 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 DSN1110.SDSNSAMP.

  • To compile a 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.)
    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"//'DSN1110.SDSNC.H'" \
     dsn8o3vp.c
  • To compile an ODBC C++ application in z/OS UNIX System Services: Use the cxx compile command with the -W 'c' compile option
    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"//'DSN1110.SDSNC.H'" \
     dsn8o3vp.c