Example
4 uses a combination of
libnames.parm,
spdsserv.parm, and user-issued SAS code submitted to
SPD Server to create multiple domains that house the following:
-
permanent production tables
-
permanent to semi-permanent user
tables
-
temporary tables for intermediate
calculations
In the
Example 4 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, and at the same time,
use temporary tables with sufficient disk space to perform large or
optimized intermediate table calculations. Multiple data and index
paths are specified to take advantage of RAID-configured disk arrays.
Libnames.parm file code defines the domain named PROD,
which contains permanent production and historical data tables:
LIBNAME=PROD PATHNAME=/metadata/prod
options="
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. Content in
USERTBLS can be saved and deleted by SPD Server users.
LIBNAME=USERTBLS PATHNAME=/metadata/usertbls
options="
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
options="
DATAPATH=('/data01/spdtemp'
'/data02/spdtemp'
'/data03/spdtemp'
'/data04/spdtemp'
'/data05/spdtemp'
'/data06/spdtemp')
INDEXPATH=('/idx01/spdtemp'
'/idx02/spdtemp'
'/idx03/spdtemp'
'/idx04/spdtemp')";
Spdsserv.parm file code uses the TMPDOMAIN=SPDTEMP statement
to reference the domain that was created for temporary tables, and
uses the WORKPATH= statement to identify an array of RAID-enable 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')";
SAS code
submitted to SPD Server by the user connects to the PROD, USERTBLS,
and SPDTEMP domains, and configures SPDTEMP as a temporary domain
space. Tables in the SPDTEMP domain will be 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;