the best way to delete datasets



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

the best way to delete datasets

Postby samb01 » Tue Sep 25, 2012 2:18 pm

Hello,

actually we delete dataset by using IDCAMS :

//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE PRTR.XDSR.*
DELETE PRTR.XDSR.*.N01
DELETE PRTR.XDSR.*.N02
DELETE PRTR.XDSR.*.N03
DELETE PRTR.XDSR.*.N04
//*

The sysout of the job shows 319 files deleted by idcams.

But it took a very long time... Two hours to delete those files. Because the machine was full... I mean lot's of job was running during this delete.


So i would like to know if there is another way to delete those files more quickly...

By using ADRDSSU for example or IEFBR14. Thank's to tell me about your experience.

sam
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: the best way to delete datasets

Postby BillyBoyo » Tue Sep 25, 2012 2:28 pm

Presumably to take so long some dataset at least was migrated?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: the best way to delete datasets

Postby samb01 » Tue Sep 25, 2012 2:45 pm

No, not migrated.
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: the best way to delete datasets

Postby BillyBoyo » Tue Sep 25, 2012 3:51 pm

Do you get CPU/IO stats for the step? Anything odd? Or was your machine really full and your priority really low?

IEFBR14 may be "faster" if getting access to CPU is the problem, but you'd have to generate the DDs.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: the best way to delete datasets

Postby samb01 » Tue Sep 25, 2012 5:04 pm

EXCP : 1821

CPU : .02

I confirme the machine was full.

I think it will be difficult to use IEFBR14 because i don't know the dataset name (i'm afraid of forgetting one...)

I would like to try with ADRDSSU to see the difference. Have you got an experience about it ?

When the machine is not full, the step takes a few minutes.... (3 minutes :


EXCP : 1406
CPU : .01
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: the best way to delete datasets

Postby BillyBoyo » Tue Sep 25, 2012 5:33 pm

Well, it's doing plenty of I/O. With a heavy load on the machine and not much priority for you, it can then take time. Don't see that ADRDSSU need be much different. If it is accessing catalogs, updating catalogs, it'd be the same - except, perhaps, ADRDSSU is a much more modern piece of software than IDCAMS, so maybe there'd be some difference.

I guess you'll have to experiment. Try removing say 10 files with IDCAMS. Then knowing how many EXCPs that took, try to get to about 100 EXCPs. More if you like. Different types of files, if that is what you are doing (QSAM, VSAM, whatever).

Once you have a nice little trial set, then try with ADRDSSU and see if there is a difference.

Remember to copy your selections first.

The IEFBR14 can't do "generic" deletes. So, even if generated DDs, someone could always slip a new file in. I suspect it would be "faster" because the I/Os would be related to the operating system rather than "your program". Perhaps you can continue the experiment with IEFBR14 just for knowledge.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: the best way to delete datasets

Postby dick scherrer » Tue Sep 25, 2012 9:23 pm

Hello,

When deleting files "wholesale" as you are, i find it wise to make a backup of the files being deleted. If you use adrdssu (dfdss) you can accomplish both fairly quidkly. If there is a reasonable number of datasets being deleted.

IDCAMS is notoriously slow (slower than most everything else). ADRDSSU typically runs quickly - depending on volume.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: the best way to delete datasets

Postby samb01 » Wed Sep 26, 2012 2:46 pm

Ok,

thanks for your hlep.

I will try ADRDSSU to see the difference.
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: the best way to delete datasets

Postby dick scherrer » Wed Sep 26, 2012 8:01 pm

Hello,

Someone will be here if there are questions.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post