A fix is available
APAR status
Closed as program error.
Error description
SQLTransact() returns SQLSTATE 08007 when using location alias. DB2 FOR OS/390 ODBC DRIVER SQLSTATE=08007 ERRLOC=2:160:3
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * * All users of DB2 Version 12 * * for z/OS ODBC/CLI driver. * **************************************************************** * PROBLEM DESCRIPTION: * * SQLTransact()/SQLEndTran() may return * * SQLSTATE 08007 or SQLSTATE 08003 when * * location alias is used and keyword * * CONNECTTYPE=2 is set in the * * initialization file. * **************************************************************** * RECOMMENDATION: * * Apply corrective PTF when available * **************************************************************** When a connection handle is connected to a location alias with CONNECTTYPE=2 in the initialization file, SQLTransact() or SQLEndTran() on another connection may return SQLSTATE 08007 or SQLSTATE 08003. If an application issues SQLDisconnect() to disconnect from the location alias, the physical connection of the alias is also disconnected. Any subsequent call to SQLTransact() or SQLEndTran() to request a commit on any other connection handle which is connected to the physical location will fail with either SQLSTATE 08007 or SQLSTATE 08003. The following example illustrates the problem: 1. Create a DB2 location alias DBAL1 at physical location DB1. 2. Set CONNECTTYPE=2 under the common section in the ODBC initialization file. 3. Issue SQLAllocHandle() or SQLAllocConnect() to allocate two connection handles hdbc1 and hdbc2. 4. Issue SQLConnect() to establish a connection to DB1 through connection handle hdbc1. 5. Issue SQLConnect() to establish a connection to DBAL1 through connection handle hdbc2. 6. Issue SQLDisconnect() to close the connection that is associated with connection handle hdbc2. 7. Issue SQLTransact() to request a commit on connection handle hdbc1. SQLTransact() may return SQLSTATE=08007 with the following error mesage on DB2 12: {DB2 FOR OS/390}{ODBC DRIVER} SQLSTATE=08007 ERRLOC=11:7:3
Problem conclusion
Code has been changed to correctly handle SQLDisconnect() when location alias is used.
Temporary fix
Comments
APAR Information
APAR number
PI72309
Reported component name
DB2 ODBC/JDBC/S
Reported component ID
5740XYR02
Reported release
C17
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-11-14
Closed date
2017-05-19
Last modified date
2017-07-05
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI47398
Modules/Macros
DSNAOG17 DSNAOC0L DSNAOC08 DSNAOC17 DSNAOG08 DSNAOC1L DSNAOC03 DSNAOC02 DSNAOG1L DSNAOTRC DSNAOG02 DSNAOG03 DSNAOSDK DSN@LIF4 DSNAOCLI DSNAOG0L
Fix information
Fixed component name
DB2 ODBC/JDBC/S
Fixed component ID
5740XYR02
Applicable component levels
RC17 PSY UI47398
UP17/06/06 P F706
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"C17"}]
Document Information
Modified date:
04 March 2021