This example uses a combination of libnames.parm parameter file settings, spdsserv.parm
parameter file settings, and user-issued SAS code that is
submitted to SPD Server to define multiple domains that store the following items:
-
permanent production tables
-
permanent to semi-permanent user
tables
-
temporary tables for intermediate
calculations
In this environment, users can access information from permanent production-type tables,
manipulate the information, and save and delete the results in a semi-permanent user
space. At the same time, they can use temporary tables with sufficient disk space
to perform large or optimized intermediate table calculations. The code specifies
data and index paths to take advantage of RAID-configured disk arrays.
This libnames.parm parameter file defines the domain PROD, which contains permanent
production and historical data tables.
libname=prod pathname=/metadata/prod
roptions="
datapath=('/data01/prod'
'/data02/prod'
'/data03/prod'
'/data04/prod'
'/data05/prod'
'/data06/prod'
'/data07/prod'
'/data08/prod'
'/data09/prod')
indexpath=('/idx01/prod'
'/idx02/prod'
'/idx03/prod'
'/idx04/prod'
'/idx05/prod')";
Additional libnames.parm parameter file code defines the domain USERTBLS, which contains
semi-permanent tables for user projects. SPD Server users can save and delete content
in USERTBLS.
libname=usertbls pathname=/metadata/usertbls
roptions="
datapath=('/data01/usertbls'
'/data02/usertbls'
'/data03/usertbls'
'/data04/usertbls'
'/data05/usertbls'
'/data06/usertbls'
'/data07/usertbls'
'/data08/usertbls'
'/data09/usertbls')
indexpath=('/idx01/usertbls'
'/idx02/usertbls'
'/idx03/usertbls'
'/idx04/usertbls'
'/idx05/usertbls')";
Finally, more libnames.parm parameter file code defines the domain named SPDTEMP,
which contains temporary tablespace that is automatically deleted
at the end of the session.
libname=spdtemp pathname=/metadata/spdtemp
roptions="
datapath=('/data01/spdtemp'
'/data02/spdtemp'
'/data03/spdtemp'
'/data04/spdtemp'
'/data05/spdtemp'
'/data06/spdtemp')
indexpath=('/idx01/spdtemp'
'/idx02/spdtemp'
'/idx03/spdtemp'
'/idx04/spdtemp')";
The spdsserv.parm parameter file code uses the TMPDOMAIN=SPDTEMP option to reference
the domain that was defined for temporary tables. This code also uses the WORKPATH=
option to
identify an array of RAID-enabled disk paths for temporary work tables and temporary
intermediate files.
SORTSIZE=128M;
INDEX_SORTSIZE=128M;
GRPBYROWCACHE=128M;
BINBUFSIZE=32K;
INDEX_MAXMEMORY=8M;
NOCOREFILE;
SEQIOBUFMIN=64K;
RANIOBUFMIN=4K;
MAXWHTHREADS=8;
WHERECOSTING;
RANDOMPLACEDPF;
MINPARTSIZE=128M;
TMPDOMAIN=SPDTEMP;
WORKPATH="('/work1/spdswork'
'/work2/spdswork'
'/work3/spdswork'
'/work4/spdswork'
'/work5/spdswork')";
The following SAS code is submitted to SPD Server by the user. The code connects to
the PROD, USERTBLS, and SPDTEMP domains, and configures
SPDTEMP as a temporary domain space. Tables in the SPDTEMP domain are automatically
deleted at the end of the session.
libname prod sasspds "prod"
server=hostname.hostport
user="user-id"
password="password"
ip=yes;
libname usertbls sasspds "usertbls"
server=hostname.hostport
user="user-id"
password="password"
ip=yes;
libname spdtemp sasspds "spdtemp"
server=hostname.hostport
user="user-id"
password="password"
ip=yes
temp=yes;