In VSAM, ESDS Stands for ‘Entry Sequenced Data Set’.
Create ESDS Cluster
Example to define a ESDS Cluster
To create ESDS 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
NoteSometimes, if the cluster is already deleted, then you can get a maximum return code as 8. In order to get maximum condition code as 0, you can intentionally set MAXCC as 0 as shown above.
Example to delete VSAM cluster
Output cluster deleted
If you try to list this cluster, it will not be present as it is deleted.
How to delete VSAM cluster and set MAXCC as 0 every time
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 ESDS, the index is refered by
a. 4 byte RRN b. 2 byte RBA c. 4 byte RBA d. 2 byte RRN
4. An employee master file has to be designed for an organization. Customer says that 96% of the records of the master file will be accessed in one single cycle of processing through a COBOL program. Which of the following file organization you will recommend for the master file?
a. VSAM KSDS b. VSAM RRDS c. VSAM ESDS d. None of the above