SPDO Procedure

CLUSTER REPLACE Statement

Specifies a replacement member for a member of a cluster table.

Requirements: You must have Control access to the cluster table in order to replace a table in a cluster.
The target cluster must either have been created with UNIQUEINDEX=NO or there must not be any unique indexes defined on the cluster.

Syntax

CLUSTER REPLACE cluster-tablename OLDMEMBER=member-name
NEWMEMBER=member-name;

Arguments

cluster-tablename

specifies the name of an existing cluster table.

OLDMEMBER=member-name

specifies the name of the member table to remove from the member list.

Alias OLDMEM=

NEWMEMBER=member-name

specifies the name of the new member table to replace the old table with.

Details

The CLUSTER REPLACE statement specifies a replacement member table for a single member table in a cluster. The new member table is inserted in the same slot (or cluster position) as the table that was removed.
CLUSTER REPLACE does not validate unique indexes. Therefore, it will not work if a cluster has UNIQUEINDEX=YES defined, which is the default setting for CLUSTER CREATE. You can do a CLUSTER REMOVE followed by a CLUSTER ADD to replace a member in a cluster that was created with unique indexes. The CLUSTER ADD operation will validate unique indexes. CLUSTER ADD appends new tables to the end of the cluster member list.
When CLUSTER REPLACE fails, the SAS macro variable SYSERR is set to an appropriate value. When the CLUSTER REPLACE command succeeds, SYSERR is set to 0 (zero).
When a cluster member table is replaced in the cluster, users that currently have that particular cluster open for Read access will not see the change until a subsequent reopen or open of the table after the replace command has completed. The replaced table becomes visible as a separate table, but the table is in a Read-only state. If there is a need to update the table, use the CLUSTER FIX statement to restore the table to a writable state. For more information, see CLUSTER FIX Statement.

Example

This CLUSTER REPLACE statement replaces member table sales201601 with new member table sales201601 in cluster table Sales_History’s member list.
cluster replace sales_history
oldmem=sales201601 newmem=sales201601;
Last updated: February 3, 2017