Suppose your company
generates a server table that contains monthly sales transactions.
You have 24 tables, representing the past 24 months. You’ve
been asked to link the tables so that reports can be written that
compare sales figures to assist in identifying any trends. You’ve
been told that the reports will be needed twice annually.
The following example shows the PROC SPDO code that you can use to create a dynamic
cluster table named Sales_History with the 24 tables.
proc spdo library=libref;
cluster create Sales_History
mem=sales201301
mem=sales201302
mem=sales201303
mem=sales201304
mem=sales201305
mem=sales201306
mem=sales201307
mem=sales201308
mem=sales201309
mem=sales201310
mem=sales201311
mem=sales201312
mem=sales201401
mem=sales201402
mem=sales201403
mem=sales201404
mem=sales201405
mem=sales201406
mem=sales201407
mem=sales201408
mem=sales201409
mem=sales201410
mem=sales201411
mem=sales201412
quit ;
The PROC SPDO LIBRARY= argument specifies the libref that represents the
SPD Server domain that contains the tables to be clustered. The CLUSTER CREATE statement specifies
to create a cluster table named Sales_History. The MEM= argument identifies the members
of the dynamic cluster table. The other parameters are left to use their default values:
-
The cluster table and its members
cannot be destroyed.
-
There is no limit on the number
of members, beyond the system configured value, so additional months
of sales data can be added as they become available.
-
Unique indexes are validated.