Link-editing 31-bit XPLINK applications

For applications that are compiled as 31-bit XPLINK applications, you must link-edit your applications with the DFSMS binder.

For 31-bit XPLINK applications, you should use the 31-bit XPLINK ODBC driver. Although doing so is not recommended, you can also use the non-XPLINK driver with 31-bit XPLINK compiled applications.

To link-edit 31-bit XPLINK applications:

Perform one of the following actions:
Option Description
Link-edit the application in z/OS® Include the member DSNAOCLX as input to the binder by specifying it in the binder SYSIN data definition statement concatenation.

For an example of z/OS XPLINK link-edit jobs, see the DSNTEJ8X sample job in DSN1310.SDSNSAMP.

Link-edit the application in z/OS UNIX System Services Use the c89 command to prelink and link-edit C applications and the cxx command to prelink and link-edit C++ applications. Include the following items in the command:
  • The Db2 ODBC definition sidedeck, DSN1310.SDSNMACS(DSNAOCLX), as one of the input data sets.

    Before you can use a Db2 ODBC definition sidedeck for input to the c89 or cxx command, you must either specify an alias that uses .EXP for the last qualifier, or change the value of the _XSUFFIX_HOST z/OS UNIX environment variable.

  • The 'dll' link-edit option.

Alternatively, you can use the xlc utility on z/OS UNIX System Services to link-edit the application. Follow the appropriate syntax for that utility.

Example: link-editing in z/OS UNIX when you specify an alias for the ODBC definition sidedeck
Assume that you have already compiled an application named myapp.c to create a myapp.o file in the current working directory. Assume that you also specified an alias that uses .EXP as the last qualifier for the Db2 ODBC definition sidedeck. You can use the following c89 command to prelink and link-edit an XPLINK 31-bit C application:
c89  -W l,xplink,dll,AMODE=31,map \
 -o dsn8o3vp dsn8o3vp.o "//'DSN1310.SDSNC.EXP(DSNAOCLX)'"
You can use the following cxx command to prelink and link-edit an XPLINK 31-bit C++ application:
cxx  -W l,xplink,dll,AMODE=31,map \
 -o dsn8o3vp dsn8o3vp.o "//'DSN1310.SDSNC.EXP(DSNAOCLX)'"
Example: link-editing in z/OS UNIX when you change the value of the XSUFFIX_HOST variable
Assume that you have already compiled an application named myapp.c to create a myapp.o file in the current working directory. Assume that you changed the value of the _C89_XSUFFIX_HOST or _CXX_XSUFFIX_HOST environment variable to SDSNMACS. You can use the following c89 command to prelink and link-edit an XPLINK 31-bit C application:
c89 -W l,xplink,dll,AMODE=31,map \
-o dsn8o3vp dsn8o3vp.o "//'DSN1310.SDSNMACS(DSNAOCLX)'"
You can use the following cxx command to prelink and link-edit an XPLINK 31-bit C++ application:
cxx -W l,xplink,dll,AMODE=31,map \
-o dsn8o3vp dsn8o3vp.o "//'DSN1310.SDSNMACS(DSNAOCLX)'"