Alter a Cluster Name and the Associated Data and Index Names: Example 8
In this example, ALTER is used to rename a cluster and its associated
data and index entries.
//EXAMPL JOB ...
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
DEFINE CLUSTER -
(NAME(EXAMPLE.KSDS) -
TRK(1 1) -
VOL (338001)) -
DATA -
(NAME(EXAMPLE.KSDS.DATA)) -
INDEX -
(NAME(EXAMPLE.KSDS.INDEX))
ALTER -
EXAMPLE.KSDS -
NEWNAME(EXAMPLE.TEST)
ALTER -
EXAMPLE.KSDS.* -
NEWNAME(EXAMPLE.TEST.*)
/*
In the first part of the example, DEFINE CLUSTER defines a cluster
and its data and index components with the same high-level qualifier,
with these names:
- EXAMPLE.KSDS
- EXAMPLE.KSDS.DATA
- EXAMPLE.KSDS.INDEX
In the second part of the example, ALTER renames the cluster and its components.
The first ALTER command parameters are:
- EXAMPLE.KSDS identifies the object to be modified (cluster component previously defined).
- NEWNAME changes the entry name EXAMPLE.KSDS to EXAMPLE.TEST. This
alters the cluster name to:
- EXAMPLE.TEST
The second ALTER command parameters are:
- EXAMPLE.KSDS.* identifies the objects to be modified (data and index components previously defined).
- NEWNAME changes each generic entry name EXAMPLE.KSDS.* to EXAMPLE.TEST.*.
This alters the data and index names to:
- EXAMPLE.TEST.DATA
- EXAMPLE.TEST.INDEX
Attention: Use the second example of the ALTER command with caution. Any data set with the first two qualifiers EXAMPLE.KSDS will be altered.