I have had a couple of offline requests for the FDREPORT input to do
what Roberto wants, so here it is. This is a slightly modified version
of a report included in our HealthCheck series (member HCHECK8 in JCLLIB).
//CATDSN EXEC PGM=FDREPORT,REGION=0M
//SYSPRINT DD SYSOUT=*
TITLE LINE='SPACE OCCUPIED BY ALL DATASETS, SUMMARIZED BY INDEX'
DEFAULT BYTEFORMAT=MEGABYTES,SORTALLOC=YES
SORT FIELD=(INDEX),SEQUENCE=(A),BREAK=(SSP)
SUMMARY FIELD=(DSN,SIZE,BYTES,BYTESFRE)
PRINT DATATYPE=CATVTOC
DATATYPE=CATVTOC gets datasets first from the catalog, then from the
VTOC, so it only shows cataloged datasets.
The SORT is on field name INDEX, which defaults to the first index level
in the dataset name, and it generates a summary whenever the index changes.
The summary shows the index on which the break was done and the count of
datasets, the total size of the datasets in tracks and in MB, and the
free space total in MB.
BTW, for purists, the MB is based on 1000 but can be based on 1024 if
you like.
Here is a brief extract of what the report looks like:
D/S
DATA SET NAME VOLSER ORG RECFM BKSIZ LRECL ALLOC FREE %FR
------------- ------ --- ----- ----- ----- ------ ------ ---
BAB.AC.DATA IDPLB8 PS FB 3120 40 1 0 0
BAB.BAB2.SPFTEMP0.CNTL IDPLB0 PS FB 6480 80 2 1 50
BAB.CALL.LOG IDPLB0 PO FB 23472 72 120 34 28
. . .
SUBTOTAL -- INDEX-----BAB
DSN---------------26 SIZE------------2579 BYTES-----------120M
BYTESFRE---------34M
FINAL TOTALS --
DSN---------------70 SIZE-----------26964 BYTES----------1228M
BYTESFRE---------66M
Subtotals are by index, obviously, and the final totals are for the
whole report.
If you don't want the detail report, add ",RPTYPE=NONE" to the PRINT
statement (RPTYPE is report type)
If you want to separate the detail report and summary report, add these DDs
//ABRMAP DD SYSOUT=* detail
//ABRSUM DD SYSOUT=* summary
MANY other options and field names are available.
To show you how blazingly fast FDREPORT is, I ran a version of this
report which selected 32,912 datasets from various catalogs in 3.89
seconds. Then it found only 1340 of them in VTOCs and reported on
those, in a total of 30 seconds.
--
Bruce A. Black
Senior Software Developer for FDR
Innovation Data Processing 973-890-7300
personal: [EMAIL PROTECTED]
sales info: [EMAIL PROTECTED]
tech support: [EMAIL PROTECTED]
web: www.innovationdp.fdr.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html