This example uses an older server method to refresh a dynamic cluster table by unbinding
the cluster, changing the member tables, and then re-binding the cluster.
This method remains functional. Most users will find that the newer server statements
(CLUSTER REMOVE, CLUSTER ADD, and CLUSTER REPLACE) produce identical results without
requiring the dynamic cluster to be disassembled.
This example illustrates use of the CLUSTER UNDO and CLUSTER CREATE statements to
refresh dynamic cluster table Sales_History. First, the 18-member dynamic cluster
table Sales_History is unbound.
The 12 member tables that contain 2014 sales data are omitted when the dynamic cluster
table Sales_History is re-created. When the table is re-created, only the six member
tables that contain 2015 sales data are included. These combined actions refresh the
contents of the dynamic cluster table Sales_History.
/* declare main vars */
%let host=kaboom;
%let port=5400;
%let spdssize=256M;
%let spdsiasy=YES;
libname mylib sasspds "sales"
&host..&port
user='anonymous'
IP=YES ;
/* Use PROC SPDO to undo the existing dynamic */
/* cluster table Sales_History, then rebind */
/* it with members from months in 2015 only */
PROC SPDO library=mylib;
cluster undo sales_history;
cluster create sales_history
mem=sales201501
mem=sales201502
mem=sales201503
mem=sales201504
mem=sales201505
mem=sales201506;
quit;
/* Verify the contents of the refreshed dynamic */
/* cluster table sales_history */
proc contents data=mylib.sales_history;
run;