A SERVICE OF

logo

42 SAS/ACCESS Interfaces and Threaded Reads Chapter 6
Previous versions of SAS opened a single connection and issued:
SELECT salesnumber,maxsales FROM SALESDATA;
Assuming SalesData has an integer column EmployeeNum, Version 9 of SAS, might
open two connections, issuing the following statements:
SELECT salesnumber,maxsales FROM salesdata WHERE (EMPLOYEENUM mod 2)=0;
and
SELECT salesnumber,maxsales FROM SALESDATA WHERE (EMPLOYEENUM mod 2)=1;
For more information about MOD, see “Autopartitioning Techniques in SAS/
ACCESS” on page 46
Note: Might is an important word here. Most, but not all, SAS/ACCESS interfaces
support threaded reads in Version 9. The partitioning WHERE clauses that SAS
generates vary. SAS cannot always generate partitioning WHERE clauses, in which
case the SAS user can supply them. There also might be other means used to partition
the data, instead of the WHERE clauses.
SAS/ACCESS Interfaces and Threaded Reads
The SAS/ACCESS interfaces that support threaded reads for Version 9 are listed
here. More interfaces are expected to support threaded reads in future releases.
Oracle*
DB2 UNIX/PC
ODBC
SYBASE
Teradata
*Threaded reads for the Oracle engine are not supported under MVS (OS/390).
Threaded reads work across all Unix and Windows platforms where you run SAS.
There are special considerations for OS/390; see the Oracle-specific and
Teradata-specific sections about threaded reads for details.
Scope of Threaded Reads
SAS steps called threaded applications are automatically eligible for a threaded read.
Threaded applications are bottom-to-top fully threaded SAS procedures that perform
data reads, numerical algorithms, and data analysis in threads. Only some SAS
procedures are threaded applications. Here is a basic example of PROC REG, a SAS
threaded application:
libname lib oracle user=scott password=tiger;
proc reg simple
data=lib.salesdata (keep=salesnumber maxsales);
var _all_;
run;
For DBMSs, many more SAS steps can become eligible for a threaded read,
specifically, steps with a read-only libref. A libref has the form Lib.DbTable, where Lib