This example uses a
combination of libnames.parm, spdsserv.parm, and user-issued SAS code
that is submitted to SPD Server to create 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.
The libnames.parm file
code defines the domain named 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
file code defines the domain named 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
file code defines the domain named SPDTEMP, which contains temporary
table space that is automatically deleted at the end of the SPD Server
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 file
code uses the TMPDOMAIN=SPDTEMP statement to reference the domain
that was created for temporary tables. This code also uses the WORKPATH=
statement to identify an array of RAID-enabled disk paths for temporary
SPD Server work tables and temporary SPD Server 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 SPD Server 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;