Link-editing 64-bit applications

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

About this task

For 64-bit applications, you must use the 64-bit ODBC driver.

Procedure

To link-edit 64-bit applications:

Take one of the following actions:
Option Description
To link-edit the application in z/OS®: Include the following items in your JCL:
  • The z/OS Language Environment® library SCEEBND2 in the application's SYSLIB concatenation.
  • The 64-bit definition sidedeck, DSN1310.SDSNMACS(DSNAO64C), in the SYSLIN concatenation.
  • The definition sidedecks for the LE run time library bindings in the SYSLIN concatenation. For applications that are written in C, include the C RTL sidedeck CELQS003 from the LE SCEELIB data set. For applications that are written in C++, include both CELQS003 and the C++ sidedeck CELQSCPP.

For an example of a z/OS link-edit job for a 64-bit application, see the DSNTEJ8E sample job in DSN1310.SDSNSAMP.

To 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 for 64-bit applications, DSN1310.SDSNMACS(DSNAO64C), 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 lp64 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 of 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 use the following c89 command to prelink and link-edit a 64-bit C application:
c89 -W l,lp64,map -o dsn8o3vp dsn8o3vp.o "//'DSN1310.SDSNC.EXP(DSNAO64C)'"
You use the following cxx command to prelink and link-edit a 64-bit C++ application:
cxx -W l,lp64,map -o dsn8o3vp dsn8o3vp.o "//'DSN1310.SDSNC.EXP(DSNAO64C)'"