Delete uncataloged datasets.



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Delete uncataloged datasets.

Postby Viswanathchandru » Thu Oct 17, 2013 7:09 pm

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..
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Delete uncataloged datasets.

 

Re: Delete uncataloged datasets.

Postby NicC » Thu Oct 17, 2013 7:57 pm

Try going through ISPF 3.4 specifying the volser option.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Delete uncataloged datasets.

Postby Robert Sample » Thu Oct 17, 2013 8:31 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post