Page 1 of 1

Delete uncataloged datasets.

PostPosted: Thu Oct 17, 2013 7:09 pm
by Viswanathchandru
Dear all,

I'm trying to delete some old unused datasets. But I end up in touching the cataloged dataset.

For eg: I'm trying to delete SYS1.BRODCAST which is old, and not cataloged. When I try to delete it using IEHPROGM it ends with error as its trying to scratch the dataset that is allocated to the SYSRES. Below is the JCL i tried for doing it.


//STEP1 EXEC PGM=IEHPROGM                     
//SYSPRINT DD SYSOUT=*                             
//DD1 DD DISP=OLD,VOL=SER=XXXXX,UNIT=3390         
//SYSIN DD *                                       
   SCRATCH DSNAME=dsn,VOL=3390=xxxxx,PURGE


Can someone please let me know why its not hitting the proper dataset instead its touching the live one? Or is there a way to delete datasets of this type?

Any help will be much appreciated.


Thanks,
Viswa..

Re: Delete uncataloged datasets.

PostPosted: Thu Oct 17, 2013 7:57 pm
by NicC
Try going through ISPF 3.4 specifying the volser option.

Re: Delete uncataloged datasets.

PostPosted: Thu Oct 17, 2013 8:31 pm
by Robert Sample
IEFBR14 would be my choice for such a task. The Utilities manual says
You should use IDCAMS DELETE VR to delete uncataloged data sets on SMS managed volumes. If you attempt to scratch and uncataloged data set on an SMS-managed volume, IEHPROGM will ONLY scratch (an uncatalog) a cataloged version of the data set, if one exists. When the specified volume in IEHPROGM is found to be SMS managed, a Catalog locate is used to identify a volume containing the data. The Catalog locate may return a different volume than specified in IEHPROGM resulting in the wrong data set to be scratched.