I should point out that this doesn't deal with the issue of unmounted volumes :-)
Kirk Wolf Dovetailed Technologies http://dovetail.com On Thu, Aug 15, 2019 at 9:38 AM Kirk Wolf <[email protected]> wrote: > As an opportunity to show that REXX isn't the only way to script something > on z/OS, here is an example of using a z/OS Unix shell script in a batch > job to do this. > > The COZBATCH utility is our alternative to BPXBATCH that simplifies batch > shell scripts. > "catsearch" is a little Unix shell command that produces output like ISPF > 3.4 - it uses IGGCSI00 for searching the catalog and then it gathers the > DSCBs to get label information. Combining this with the z/OS Unix "awk" > scripting program allows you to filter the output and print and format > lines for the DSN and VOLUME of uncataloged datasets. > > //UNIX EXEC PGM=COZBATCH # a better BPXBATCH > //STEPLIB DD DISP=SHR,DSN=DOVETAIL.COZ.LOADLIB > //STDIN DD * > # This is just a z/OS Unix shell script: > # Search the catalog and print those entries not found on the volume > catsearch -l "*.**" | > awk '$2 == "??" { printf("%-44s %s\n",$3,$1); }' > /* > //STDOUT DD DISP=(,PASS),DSN=&&OUT1,DCB=(RECFM=FB,LRECL=80) > // > > It would be trivial to have awk generate IDCAMS commands to delete > uncataloged entries. > > Kirk Wolf > Dovetailed Technologies > http://dovetail.com > > PS> Co:Z can be downloaded and used free under our Community License: > http://dovetail.com/support.html > For more info on: > catsearch command > https://dovetail.com/docs/dspipes/dsp-ref_catsearch.html > COZBATCH https://dovetail.com/products/cozbatch.html > > > > > On Thu, Aug 15, 2019 at 8:10 AM Pew, Curtis G < > [email protected]> wrote: > >> On Aug 15, 2019, at 7:00 AM, esmie moo < >> [email protected]> wrote: >> > >> > Yes. I am trying to find any dsns that exist in the catalog but don't >> exist on the disk. I know that we have some ancient applications which >> refer to procs that have dsns which are cataloged but do not exist on the >> disk. >> >> I’m going to recommend Rocket Mainstar Catalog RecoveryPlus for this. It >> won’t just identify the DSNs, it will generate the IDCAMS statements needed >> to clean everything up. It can also find and fix more serious problems with >> your catalogs. >> >> This is one of those products you don’t need often but saves a lot of >> time and effort when you do need it. >> >> >> -- >> Pew, Curtis G >> [email protected] >> >> >> >> >> >> >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email to [email protected] with the message: INFO IBM-MAIN >> > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
