An abnormal ending can occur when you use calls for both SAS/ACCESS Interface to ODBC and SAS/ACCESS Interface to DB2 in the same program to access DB2 from a Windows 64-bit client machine. Code similar to the following can cause the problem to occur:
/* Connect using the ODBC engine to DB2 */
proc sql;
connect to odbc (dsn=data-source-name user=user-id password=your-password);
disconnect from odbc;
quit;
/* Connect using the DB2 engine to DB2 */
libname mydb db2 datasrc=data-source-name user=user-id password=your-password;
Following the execution of the LIBNAME statement, the SAS application might end abnormally. The error might look similar to:
ERROR: Read Access Violation In Task [ Program ]
Exception occurred at (8004293F)
Task Traceback
Address Frame (DBGHELP API Version 4.0 rev 5)
000000018004293F 0000000005ECC070 DB2CLIO:CLI_callbDrdaOutput+0x1AF
00000000094078D0 0000000005ECC078 DB2APP64:csmFetch+0x584
0000000009619324 0000000005ECC300 DB2APP64:CLI_sqlCompleteCallback+0x2724
00000000094ECC6B 0000000005ECC3D0 DB2APP64:SQLFetch+0x43D
00000000080DBD65 0000000005ECC3D8 sasdbu:tkvercn1+0x1AD25
00000000080C8AA3 0000000005ECC900 sasdbu:tkvercn1+0x7A63
0000000007FCB01B 0000000005ECC908 sasiodbu:tkvercn1+0x19FDB
0000000007FCA6AB 0000000005ECD7B0 sasiodbu:tkvercn1+0x1966B
00000000060E2856 0000000005ECD7B8 sasxdbi:tkvercn1+0x31816
00000000060C1469 0000000005ECD9A0 sasxdbi:tkvercn1+0x10429
0000000004A434D5 0000000005ECD9A8 sasyh:tkvercn1+0x42495
0000000004A3B2BF 0000000005ECE4C0 sasyh:tkvercn1+0x3A27F
0000000004C42A12 0000000005ECE4C8 sasxshel:tkvercn1+0x219D2
0000000004C236F3 0000000005ECE8D0 sasxshel:tkvercn1+0x26B3
0000000004C219E4 0000000005ECE960 sasxshel:tkvercn1+0x9A4
0000000004C46C91 0000000005ECEB50 sasxshel:tkvercn1+0x25C51
0000000004C79471 0000000005ECF590 sasxshel:tkvercn1+0x58431
0000000004C7E630 0000000005ECF690 sasxshel:tkvercn1+0x5D5F0
0000000004C76657 0000000005ECF730 sasxshel:tkvercn1+0x55617
000000000508133E 0000000005ECF738 sasxbtch:tkvercn1+0x2FE
00000000036A8FD7 0000000005ECFCB8 sashost:Main+0xF917
00000000036AD5FD 0000000005ECFF50 sashost:Main+0x13F3D
00000000768B59ED 0000000005ECFF58 kernel32:BaseThreadInitThunk+0xD
0000000076FAC521 0000000005ECFF88 ntdll:RtlUserThreadStart+0x21
IBM acknowledges the following restriction on its website in Comparison of DB2 CLI and ODBC:
Restriction
Mixing ODBC and DB2 CLI features and function calls in an application is
not supported on the Windows 64-bit operating system.
An appropriate workaround is to use only one of the SAS engines in the program to access DB2.