View previous topic :: View next topic
|
Author |
Message |
boyti ko
New User
Joined: 03 Nov 2014 Posts: 78 Location: Malaysia
|
|
|
|
Hello to all,
I have a thousands of datasets like the one below, but in it, there's a gdg, vsam (data and index) and seqds. I need to delete them but is there a way to delete those even if I don't know what kind of datasets are they?
Code: |
XXX.YYYYU.DL.BPMA2.GT3.#210312
XXX.YYYYU.UL.AMEX.STMTBTA.#210312
XXX.YYYYS.DATAMART.CPDLB.#123111
XXX.YYYYG.BCPONL.DDAD.BK.SHREM3R2.G0010V00
XXX.YYYYG.BCPONL.DDAD.BK.SHREM7R2.G0008V00
XXX.YYYYG.BCPONL.DDAD.BK.SHREM8R.G0009V00
XXX.YYYYG.CPAPF2.G1021V00
XXX.YYYYG.DDAD.SHREM08.BILRES.G0008V00
XXX.YYYYG.DDAD.SHREM08.BILRES.G0008V00
XXX.YYYYG.JP10S.IXJC1.G2003V00
XXX.YYYYG.JP10S.IXJC1.G2002V00
XXX.YYYYG.JP10S.IXJC1.G1998V00
XXX.YYYYG.JP10S.IXJC1.G1997V00
XXX.YYYYG.JP10S.IXJC1.G1996V00
XXX.YYYYG.JP10S.IXJC1.G1995V00
XXX.YYYYM.CPDP075.REPORT
XXX.YYYYV.CADSTAB
XXX.YYYYV.CP10V.MPMAF.INDEX
XXX.YYYYV.SEC.LEGAL.DDSPWD.DATA |
|
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
There are issues, of course, with all of them. You need a more complete list.
- GDG - Individual GDG data sets are ordinary non-VSAM data sets. You delete them just like any other non-VSAM data set. However, if it is your goal to delete all of them you probably want to delete the GDG index, too.
- Non-VSAM - If you are confident they are cataloged AND they exist on the volume where they are cataloged you can delete then in JCL or in IDCAMS using DELETE dataset-name NONVSAM PURGE. The PURGE option deletes the data set if it has an expiration date and the expiration date has not expired. The problem here is if the data set does not exist on the volume the catalog entry will not be deleted. Another problem is if the data set is on tape. For both you use DELETE dataset-name NOSCRATCH
- VSAM - Again you use the IDCAMS DELETE cluster-name CLUSTER PURGE. As with non-VSAM if the components have disappeared you have trouble.
|
|
Back to top |
|
|
boyti ko
New User
Joined: 03 Nov 2014 Posts: 78 Location: Malaysia
|
|
|
|
Thank you for your reply Steve!
The list given is only the datasets to be deleted. If I would complete the list, then I can listcat all the datasets, but still, the GDG will be treated as non-VSAM (or VSAM).
Right now, my plan is to delete all and assume that it's all non-VSAM using IDCAMS. In the SYSPRINT, I'll collect all those return code that are not equal to zero. Then will delete again as a VSAM. But I think, there must be a way much better than this.
After all this, I'll check all of our GDG, if the base doesn't have any generations, then we will delete these too.
I'm just thinking that there might be a utility that I don't know that can solve my problem. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
You might be able to use ADRDSSU to make a backup with scratch to a dummy dataset. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
boyti ko wrote: |
Thank you for your reply Steve! ...
After all this, I'll check all of our GDG, if the base doesn't have any generations, then we will delete these too. ...
|
You're welcome.
There is a danger with that idea or the similar idea of deleting any GDG index that has no data sets defined in the index. If the index has data sets defined in it sporadically, then it could be empty, say, Friday morning, and a job could run Friday night or the weekend to allocate a data set in the index. Oops. |
|
Back to top |
|
|
boyti ko
New User
Joined: 03 Nov 2014 Posts: 78 Location: Malaysia
|
|
|
|
Thanks Prino, i'm still new to ADRDSSU, but have used this one:
Code: |
//STEP500 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//PSEUDO DD DUMMY
//SYSIN DD *
DUMP OUTDD(PSEUDO) -
DS(INCL( -
XXXXXX.XXXXV.CP10V.AMS900S.#060414.INDEX -
XXXXXX.XXXXV.CP10V.BATCHNO.RPS.DATA -
XXXXXX.XXXXS.CPD355B.JUL25 -
XXXXXX.XXXXG.DU3.LA10V.OASQUEJ.AFH.G0058V00 -
XXXXXX.XXXXV.GST.CPCFG.MODEL -
) ) -
DELETE PURGE
/* |
This one can delete GDG, SEQDS and VSAM cluster (.index and .data will not be deleted if cluster is not indicated)
Hi Steve,
We're focusing to delete all datasets that were not referenced up to 7 years. I was thinking that if it's an active GDG, then it should have at least one generation. Yearly jobs if it has GDG should have at least one.
But yes, to be on the safe side, then we can skip those GDG base since it wouldn't take that much of space and check for it thoroughly before deleting. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
For what it's worth, active GDG bases can have no generations. Some jobs accumulate generations, then are concatenated via the GDG base name, are processed, then are deleted or backed up, then the GDG base is available for the next round of "accumulations". |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
The only issue with the DFDSS (ADRDSSU) approach is that it will not delete any files migrated by DFHSM or any written direct to TAPE.
It also won't delete GDG bases, so while it is a simple approach it may not achieve fully what you want.
Normally you would specify the Cluster name for the VSAM delete and DFDSS would delete that and any related components/AIX/Path if you specify the SPHERE keyword, which is what you probably want anyway.
What you need is a means to identify files unreferenced for 7 years and feed that list through to a standard IDCAMS DELETE. You could look at Naviquest (Batch ISMF), FDREPORT or some other ISV product that can select on the name masks and produce a list of specific files to delete. |
|
Back to top |
|
|
|