VSAM RRDS
RRDS Stands for ‘Relative Record Data Set’.
Create RRDS Cluster
Example to define an RRDS Cluster
To create RRDS cluster in VSAM, you can use the utility ‘IDCAMS’ where you need to define the cluster name, Data component of the cluster and details of the cluster like FREESPACE, RECSZ, TRACS, CISZ, VOLUMES etc.
Output
You can go to ‘Data Set List Utility’ to see that the cluster is created. As you can see this in the above picture
How to load records to the RRDS cluster
If you want to load the records to the cluster, you can use ‘REPRO’ command which is similar to how we will do for ESDS and KSDS.
How to delete VSAM RRDS Cluster
If you want to delete VSAM cluster for RRDS, then you can use the ‘DELETE’ functionality of IDCAMS
Syntax 1:
DELETE (‘RRDS.CLUSTER.NAME’) CLUSTER
Syntax 2:
DELETE (‘RRDS.CLUSTER.NAME’) CLUSTER
SET MAXCC=0
How to delete VSAM cluster and set MAXCC as 0 every time
If you try to list this RRDS cluster, it will not be present as it is deleted.
In this case, we are forcing to set MAXCC as 0.
Output cluster will be deleted and MAXCC will be 0
VSAM Interview Question and Answers
1. In RRDS, where we will code the freespace?
a. data
b. Cluster
c. Index
d. Freespace is not applicable for RRD
d. Freespace is not applicable for RRD