Page 1 of 1

the best way to delete datasets

PostPosted: Tue Sep 25, 2012 2:18 pm
by samb01
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

Re: the best way to delete datasets

PostPosted: Tue Sep 25, 2012 2:28 pm
by BillyBoyo
Presumably to take so long some dataset at least was migrated?

Re: the best way to delete datasets

PostPosted: Tue Sep 25, 2012 2:45 pm
by samb01
No, not migrated.

Re: the best way to delete datasets

PostPosted: Tue Sep 25, 2012 3:51 pm
by BillyBoyo
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.

Re: the best way to delete datasets

PostPosted: Tue Sep 25, 2012 5:04 pm
by samb01
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

Re: the best way to delete datasets

PostPosted: Tue Sep 25, 2012 5:33 pm
by BillyBoyo
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.

Re: the best way to delete datasets

PostPosted: Tue Sep 25, 2012 9:23 pm
by dick scherrer
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.

Re: the best way to delete datasets

PostPosted: Wed Sep 26, 2012 2:46 pm
by samb01
Ok,

thanks for your hlep.

I will try ADRDSSU to see the difference.

Re: the best way to delete datasets

PostPosted: Wed Sep 26, 2012 8:01 pm
by dick scherrer
Hello,

Someone will be here if there are questions.