Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I easily delete (and uncatalog) a group of datasets at once?

0
Posted

How can I easily delete (and uncatalog) a group of datasets at once?

0

Well, this might not be something you would have to do often, but since I needed to and came up with a solution I thought I might as well share. In order to build a “restart” jobstream for the SMP process, I needed to be able to delete and uncatalog all of the SMP datasets on volume SMP001. Since I didn’t want to type a bunch of control statements, I wrote a little awk script – scratch.awk – to generate the jobstream for me from a LISTCAT output. If you need to do this sort of thing, this ought to be a real time saver. If you are running under Windows/?? + Cygwin, you will need the gawk.exe from Cygwin. First, run a LISTCAT – //LISTCAT JOB CLASS=A,MSGLEVEL=(1,1) //LISTCAT EXEC PGM=IDCAMS,REGION=4096K //SYSPRINT DD SYSOUT=A //SYSIN DD * LISTCAT ALL NONVSAM /* // Using an editor on your host OS (Linux/Windows/etc), cut/paste output from this job into a another plain text file. Edit scratch.awk with a plain text editor to insert the volume serial number and unit type for the volumes in th

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123