How to get the number of members in a PDS without opening it?
I was asked this question in an interview, How to count the number of members in a PDS,
I did not have a clue, but I said, it can be viewed by using information, i.e. by issuing line command "I" against the dataset name.
I was not sure if the answer was correct. But later I realized that it works.
See below the info screen, showing number of memebrs
Data Set Name . . . . : USERIDA.XXXXXXXX.YYYYYYY
General Data Current Allocation
Management class . . : XXXXXXX Allocated cylinders : 23
Storage class . . . : XXXXXXX Allocated extents . : 5
Volume serial . . . : XXXXXXX Maximum dir. blocks : 30
Device type . . . . : XXXX
Data class . . . . . : DEFAULT
Organization . . . : PO Current Utilization
Record format . . . : FB Used cylinders . . : 23
Record length . . . : 80 Used extents . . . : 5
Block size . . . . : 9040 Used dir. blocks . : 16
1st extent cylinders: 14 Number of members . : 96
Secondary cylinders : 10
Data set name type : PDS
Creation date . . . : 2007/04/02 Referenced date . . : 2011/06/18
Expiration date . . : ***None***