For threaded Reads from DBMSs, SAS/ACCESS provides the DBSLICE= and DBSLICEPARM= data set options.
DBSLICE= applies only to a table reference. You can use it to code your own WHERE clauses to partition table data across threads, and it is useful when you are familiar with your table data. For example, if your DBMS table has a CHAR(1) column Gender and your clients are approximately half female, Gender equally partitions the table into two parts. Here is an example.
proc print data=lib.dbtable (dbslice=("gender='f'" "gender='m'"));
where dbcol>1000;
run;
SAS creates two threads and about half of the data is delivered in parallel on each connection.
When you apply DBSLICEPARM=ALL instead of DBSLICE=, SAS attempts to "autopartition" the table for you. With the default DBSLICEPARM=THREADED_APPS value, SAS automatically attempts threaded Reads only for SAS threaded applications. SAS threaded applications are SAS procedures that thread input, output, and numeric operations. DBSLICEPARM=ALL extends threaded Reads to more SAS procedures, specifically steps that read only tables. As an alternative, DBSLICEPARM=NONE turns off threaded Reads entirely. You can specify it as a data set option, a LIBNAME option, or a global SAS option.
The first argument to DBSLICEPARM= is required and extends or restricts threaded Reads. The second optional argument is not commonly used and limits the number of DBMS connections. These examples demonstrate the different uses of DBSLICEPARM=.
–dbsliceparm ALL
option dbsliceparm=NONE;
libname lib oracle user=myusr1 password=mypwd1 dbsliceparm=THREADED_APPS;
proc print data=lib.dbtable(dbsliceparm=(ALL,3));
where dbcol>1000;
run;
DBSLICE= and DBSLICEPARM= apply only to DBMS table reads. THREADS= and CPUCOUNT= are additional SAS system options that apply to threaded applications. For more information about these options, see SAS System Options: Reference.