Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IEW2469E error linking 64-bit C/C++ program (LP64) with DSNHLI

46 views
Skip to first unread message

john....@oracle.com

unread,
Mar 5, 2009, 9:17:13 AM3/5/09
to
We're trying to build our C/C++ app in 64-bit mode using the XL C/C++ compiler and the compile option LP64. Our program source compiles fine, but when we try to run the program BINDER (linker) to link the object code for our program with DSNHLI (i.e. INCLUDE SDSNLOAD(DSNHLI)), we receive error message IEW2469E with reason code 3. This reason code indicates that "3. Either the reference or the target is in amode 64 and the amodes do not match". When I browse the PDS DSN810.SDSNLOAD, the DSNHLI module is listed as having an AMODE(31) RMODE(ANY). Since our program object has an AMODE(64) and DSNHLI has an AMODE(31), I can understand why we get the error, but ... how can we link our C/C++ program in 64-bit mode with DB2 ? Thanks.

Todd Burch

unread,
Mar 6, 2009, 9:24:56 PM3/6/09
to
You can have a 64-bit mode application, but the current API only supports 31-bit callers. Therefore, all your variables must be below the bar, and you must be in 31-bit mode when your SQL calls occur. You can also link your application for AMODE(64) RMODE(ANY), but you cannot statically link DSNHLI if you do that. Therefore, you can dynamically load your language interface module (ie, DSNELI for TSO, or DSNALI for Call Attach, etc.) at runtime and drop into amode 31 via SAM31 just prior to any SQL CALL. In order to linkedit, you'll have to create a stub DSNHLI routine yourself that calls the actual DSNHLI in your language interface module.

miklos.s...@isis-papyrus.com

unread,
Mar 23, 2009, 7:24:38 AM3/23/09
to
Hi

We have run into the simmilar problem, about a month.
I have opened a PMR, and the answer was:"no plan to make 64 bit API for DB2"
I don't see a realistic chance to convert everything in a C++ LP64 SQL application into 31 bit mode.
We are using the ODBC as well ...

0 new messages