Prelinking and link-editing non-XPLINK applications
Before you can link-edit a non-XPLINK application, you must prelink your application with a Db2 ODBC definition sidedeck.
About this task
For non-XPLINK applications, you should use the non-XPLINK ODBC driver. Although doing so is not recommended, you can link-edit your non-XPLINK application as an XPLINK application.
Procedure
To prelink and link-edit non XPLINK applications:
Perform one of the following actions:
- To link-edit a non-XPLINK ODBC application in z/OS®: Include the DSNAOCLI member as input
to the prelinker by specifying it in the prelink SYSIN data definition
statement concatenation.
For an example of z/OS prelink and link-edit jobs, use the DSNTEJ8 and DSNTEJ8X sample jobs in DSN1110.SDSNSAMP.
- To link-edit a non-XPLINK ODBC application in z/OS
UNIX System Services: Use
the
c89command to prelink and link-edit C applications and thecxxcommand to prelink and link-edit C++ applications. Include the following items in the command:- The Db2 ODBC non-XPLINK
definition sidedeck, DSN1110.SDSNMACS(DSNOCLI),
as one of the input data sets.
Before you can use a Db2 ODBC definition sidedeck for input to the
c89orcxxcommand, you must either specify an alias that uses.EXPfor the last qualifier, or change the value of the _XSUFFIX_HOST z/OS UNIX environment variable. - The
'dll'link-edit option.
Example: Assume that you have already compiled an application named myapp.c to create a myapp.o file in the current working directory and that you specified an alias that uses.EXPas the last qualifier for the Db2 ODBC non-XPLINK definition sidedeck. You use the followingc89command to prelink and link-edit a C application:
You use the followingc89 -W l,p,map,noer -W l,dll,AMODE=31,map \ -o dsn8o3vp dsn8o3vp.o "//'DSN1110.SDSNC.EXP(DSNAOCLI)'"cxxcommand to prelink and link-edit a C++ application:cxx -W l,p,map,noer -W l,dll,AMODE=31,map \ -o dsn8o3vp dsn8o3vp.o "//'DSN1110.SDSNC.EXP(DSNAOCLI)'"Example: Assume that you have already compiled an application named myapp.c to create a myapp.o file in the current working directory and that you changed the value of the _C89_XSUFFIX_HOST or _CXX_XSUFFIX_HOST environment variable to SDSNMACS. You use the followingc89command to prelink and link-edit a C application:
You use the followingc89 -W l,p,map,noer -W l,dll,AMODE=31,map -o dsn8o3vp dsn8o3vp.o "//'DSN1110.SDSNMACS(DSNAOCLI)'"cxxcommand to prelink and link-edit a C++ application:cxx -W l,p,map,noer -W l,dll,AMODE=31,map -o dsn8o3vp dsn8o3vp.o "//'DSN1110.SDSNMACS(DSNAOCLI)'" - The Db2 ODBC non-XPLINK
definition sidedeck, DSN1110.SDSNMACS(DSNOCLI),
as one of the input data sets.