How can I easily delete (and uncatalog) a group of datasets at once?
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