This beautiful example is gilding the lily. Why not just delete all the
GDG bases? Lots of CC8(12?) but hold your nose and it's done.
On 8/28/2013 1:18 PM, Greg Dorner wrote:
This will report onb GDG's with no GDS's attached. You could alter it to also
delete them if you want.
JCL:
//LISTCAT EXEC PGM=IDCAMS
//SYSPRINT DD DSN=&&SYSPRINT,
// SPACE=(CYL,(50,20),RLSE),
// LRECL=121,RECFM=FBA,BLKSIZE=0,
// DISP=(,CATLG)
//SYSIN DD *
LISTC CATALOG('SYS1.CATALOG.NAME') NAMES
/*
//GDGNULL EXEC PGM=IKJEFT01,PARM='GDGNULL'
//SYSEXEC DD DISP=SHR,DSN=......SYSEXEC LIBRARY ......
//INPUT DD DISP=(OLD,DELETE),DSN=&&SYSPRINT
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
REXX:
/*rexx*/
say ' '
say 'GDGNULL processing started....'
say ' '
numgdgs = 0
numnull = 0
"execio * diskr input (STEM gdgline. finis)"
do g=1 to gdgline.0
if substr(gdgline.g,2,16) = 'GDG BASE ------ ' then do
numgdgs = numgdgs + 1
gdgbase = strip(substr(gdgline.g,18,44))
drop idcline.
x = outtrap(idcline.,'*',noconcat)
"listc entry('"gdgbase"') all"
x = outtrap(off)
if rc = 0 then do i=1 to idcline.0
if substr(idcline.i,8,9) = 'NONVSAM-- ' then leave
iterate
end
if i = idcline.0 + 1 then do
gdgbase = left(gdgbase,44)
say gdgbase 'has no associated data sets'
numnull = numnull + 1
end
end
end
numgdgs = right(numgdgs,7,' ')
numnull = right(numnull,7,' ')
say ' '
say numgdgs 'GDG base entries processed'
say numnull 'GDG base entries had no associated data sets'
say ' '
say 'GDGNULL processing complete.'
say ' '
say ' '
exit 0
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN