SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 33733: The LIBNAME statement’s QUALIFIER= option is not honored in subsequent PROC SQL SELECT statements that include the DISTINCT option and that are run against the same libref

DetailsHotfixAboutRate It

In SAS/ACCESS® Interface to DB2, if you assign a libref and include the QUALIFIER= option in the LIBNAME statement, the QUALIFIER= option is ignored in any subsequent SQL-procedure SELECT statement that includes the DISTINCT option and that is run against that same libref.

The following SASTRACE= output shows how the SQL code that is passed to the database does not honor the QUALIFIER= option from the LIBNAME statement if the PROC SQL SELECT statement includes the DISTINCT option. (See line DB2_2 in the output.)

libname d db2 user=dbitest pw=dbigrp1 schema=sysibm qualifier=sample
db=sample;

NOTE: Libref D was successfully assigned as follows:
      Engine:        DB2
      Physical Name: sample

options sastrace=',,,d' sastraceloc=saslog;
proc sql;
create table work.test as select distinct name from d.systables;

DB2: AUTOCOMMIT turned ON for connection id 0 0 1184677962 xoopen 0 SQL
  1 1184677962 du_prep 0 SQL
DB2_1: Prepared: 2 1184677962 du_prep 0 SQL
SELECT * FROM sample.sysibm.SYSTABLES FOR READ ONLY  3 1184677962 du_prep 0
SQL
  4 1184677962 du_prep 0 SQL
DB2: COMMIT performed on connection 0. 5 1184677962 du_comm 0 SQL
  6 1184677962 du_prep 0 SQL
DB2_2: Prepared: 7 1184677962 du_prep 0 SQL
 select distinct sysibm.systables."NAME" from sysibm.SYSTABLES FOR READ ONLY
8 1184677962 du_prep 0 SQL
  9 1184677962 du_prep 0 SQL
DB2: COMMIT performed on connection 0. 10 1184677962 du_comm 0 SQL
  11 1184677962 du_exec 0 SQL
DB2_3: Executed: 12 1184677962 du_exec 0 SQL
Prepared statement DB2_2 13 1184677962 du_exec 0 SQL
  14 1184677962 du_exec 0 SQL
ACCESS ENGINE:  SQL statement was passed to the DBMS for fetching data.  15
1184677962 sqlloop 0 SQL
NOTE: Table WORK.TEST created, with 286 rows and 1 columns.

However, the QUALIFIER= option IS honored if the subsequent PROC SQL SELECTstatement does not include the DISTINCT option. (See line DB2_5 in the following SASTRACE= output.)

create table work.test as select name from d.systables;

  16 1184678010 du_prep 0 SQL
DB2_4: Prepared: 17 1184678010 du_prep 0 SQL
SELECT * FROM sample.sysibm.SYSTABLES FOR READ ONLY  18 1184678010 du_prep 0
SQL
  19 1184678010 du_prep 0 SQL
DB2: COMMIT performed on connection 0. 20 1184678010 du_comm 0 SQL
  21 1184678010 du_prep 0 SQL
DB2_5: Prepared: 22 1184678010 du_prep 0 SQL
SELECT  "NAME"  FROM sample.sysibm.SYSTABLES  FOR READ ONLY  23 1184678010
du_prep 0 SQL
  24 1184678010 du_prep 0 SQL
DB2: COMMIT performed on connection 0. 25 1184678010 du_comm 0 SQL
  26 1184678010 du_exec 0 SQL
DB2_6: Executed: 27 1184678010 du_exec 0 SQL
Prepared statement DB2_5 28 1184678010 du_exec 0 SQL
  29 1184678010 du_exec 0 SQL
NOTE: Table WORK.TEST created, with 336 rows and 1 columns.
  7? quit;

Select the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ACCESS Interface to DB2Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft® Windows® for x649.1 TS1M3 SP4
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP4
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP4
z/OS9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
SAS SystemSAS/ACCESS Interface to HP NeoviewMicrosoft® Windows® for x649.219.2 TS2M0
Microsoft Windows Server 2003 Datacenter Edition9.219.2 TS2M0
Microsoft Windows Server 2003 Enterprise Edition9.219.2 TS2M0
Microsoft Windows Server 2003 Standard Edition9.219.2 TS2M0
Microsoft Windows XP Professional9.219.2 TS2M0
Windows Vista9.219.2 TS2M0
64-bit Enabled AIX9.219.2 TS2M0
64-bit Enabled Solaris9.219.2 TS2M0
HP-UX IPF9.219.2 TS2M0
Linux9.219.2 TS2M0
SAS SystemSAS/ACCESS Interface to Informix64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
Tru64 UNIX9.1 TS1M3 SP4
SAS SystemSAS/ACCESS Interface to Microsoft SQL Server64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
SAS SystemSAS/ACCESS Interface to MySQLMicrosoft® Windows® for x649.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
Linux9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
SAS SystemSAS/ACCESS Interface to NetezzaMicrosoft® Windows® for x649.2 TS2M0
Microsoft Windows Server 2003 Datacenter Edition9.2 TS2M0
Microsoft Windows Server 2003 Enterprise Edition9.2 TS2M0
Microsoft Windows Server 2003 Standard Edition9.2 TS2M0
Microsoft Windows XP Professional9.2 TS2M0
Windows Vista9.2 TS2M0
64-bit Enabled AIX9.2 TS2M0
64-bit Enabled HP-UX9.2 TS2M0
64-bit Enabled Solaris9.2 TS2M0
HP-UX IPF9.2 TS2M0
Linux9.2 TS2M0
Linux for x649.2 TS2M0
SAS SystemSAS/ACCESS Interface to ODBCMicrosoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP4
Microsoft® Windows® for x649.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
Tru64 UNIX9.1 TS1M3 SP4
SAS SystemSAS/ACCESS Interface to Oraclez/OS9.1 TS1M3 SP4
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP4
Microsoft® Windows® for x649.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
OpenVMS Alpha9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
Tru64 UNIX9.1 TS1M3 SP4
SAS SystemSAS/ACCESS Interface to PC Filesz/OS9.1 TS1M3 SP4
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP4
Microsoft® Windows® for x649.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
Tru64 UNIX9.1 TS1M3 SP4
SAS SystemSAS/ACCESS Interface to SybaseMicrosoft® Windows® for x649.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
Tru64 UNIX9.1 TS1M3 SP4
SAS SystemSAS/ACCESS Interface to Teradataz/OS9.1 TS1M3 SP4
Microsoft® Windows® for x649.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.