Assume that a user in
the Asia department needs to create an SPD Server table on the departmental
server
asiacpu. This task requires data to
be extracted from an SPD Server table named
alldata. The user knows that the
alldata table
resides in the domain
world
. The user submits
the following SAS code on a desktop SPD Server client:
LIBNAME worldlib sasspds 'world'
server=namecpu.spdsname;
LIBNAME asialib sasspds 'asia'
server=namecpu.spdsname;
data asialib.mydata;
set worldlib.alldata;
where region='Asia';
if country='Japan' then
subreg=1;
run;
This code extracts records
from an SPD Server table named
alldata that
resides in the domain
world
. The
world
domain is stored on machine
worldcpu in the directory
/spds
. Because the
alldata table resides on
worldcpu, and SPD Server processes certain SAS WHERE clauses, the search
for the value
Asia
is performed on
worldcpu.
The SAS program runs
on the Asia user's desktop machine. The desktop machine scans each
row in the
alldata table, looking for the
string
Japan
. If the string is found, the
desktop client forwards the row to the machine on which the output
table resides, which is
asiacpu in this example.
Disk space for the output
table
mydata is allocated in the
/spds
directory on
asiacpu. The processing work (transferring data received from the user's
desktop machine to the SPD Server table) is also performed by
asiacpu.
The processing that
was required to create the output SPD Server table was distributed
across three machines. However, the user's desktop machine requires
no permanent disk space, because SAS WHERE clauses execute on the
machine that stores the source table. Only the selected rows that
match the submitted WHERE clause are sent over the network to the
desktop client. This strategy significantly reduces both network traffic
and the time that is needed to complete a SAS program.