Compiling 31-bit XPLINK applications
If your 31-bit application needs to use z/OS® XPLINK function linkage, use the ODBC 31-bit XPLINK driver and compile your application as an XPLINK application.
Procedure
To compile 31-bit XPLINK applications:
Perform one of the following actions based on the compiler
method:
| Compile method | Application language | Action |
|---|---|---|
| Compile on z/OS | All | Specify the XPLINK compile option. For an example, see DSNTEJ8X in prefix.SDSNSAMP. |
| Compile in z/OS UNIX System Services | C | Use the c89 command with the -W 'c,xplink,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 |
| C++ | Use the cxx compile command with the -W 'c,xplink' compile option.For example, to compile a C++ application that is named dsn8o3vp.c that resides in the current working directory, use the following |
|
| Compile with the xlc utility on z/OS UNIX System Services | C | Specify the appropriate compiler options in the source program, a configuration file, or on the command line. For example, to compile a C application that is named dsn8o3vp.c, you can use the following command:
|
| C++ | Specify the appropriate compiler options in the source program, a configuration file, or on the command line. For example, to compile a C++ application that is named dsn8o3vp.c, you can use the following command: |