|
|
| Author |
Message |
anoopn1985
New User
Joined: 23 Apr 2007 Posts: 7 Location: tvm
|
|
|
|
Hi,
I have to delete around 1000 datasets having the similar names. Each dataset name is starting with A.B (A.B.*). How can I delete all datasets with name starts as A.B.*? |
|
| Back to top |
|
 |
References
|
Posted: Wed May 14, 2008 5:49 pm Post subject: Re: How to delete multiple datesets with name A.B.* |
 |
|
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3001 Location: Charlotte,NC USA
|
|
| Back to top |
|
 |
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 138 Location: At my Desk
|
|
|
|
| anoopn1985 wrote: |
Hi,
I have to delete around 1000 datasets having the similar names. Each dataset name is starting with A.B (A.B.*). How can I delete all datasets with name starts as A.B.*? |
Similar post is answered..pls do search |
|
| Back to top |
|
 |
anoopn1985
New User
Joined: 23 Apr 2007 Posts: 7 Location: tvm
|
|
|
|
A small change in the question.. My datasets looks like A.B*.*.*
Not like A.B.*.That is datasets like
A.BJan01.ABC.DEF
A.BJan02.ABC.XYZ
A.BJan01.ZZZ.AAA
etc.. That is only the first qualifier and partial part of second qualifier is same. As mentioned inthe above links, I tried with IDCAMS and ADRDSSU. But none of these gave the expected result. If datasets are like A.B.* (Only having 1 qualifier is missing), then IDCAMS is working.
Please help me for getting the desired results.. |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6726 Location: 221 B Baker St
|
|
|
|
Hello,
One way would be to generate the list of dataset names you want to delete and then create either DD statements or IDCAMS control statements using that list of dsn's as input. |
|
| Back to top |
|
 |
anoopn1985
New User
Joined: 23 Apr 2007 Posts: 7 Location: tvm
|
|
|
|
Dick,
How to generate the dataset names? |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6726 Location: 221 B Baker St
|
|
| Back to top |
|
 |
yogeshwar_ade
Active User
Joined: 31 Aug 2006 Posts: 70 Location: INDIA
|
|
|
|
| anoopn1985 wrote: |
My datasets looks like A.B*.*.*
Not like A.B.*.
|
I hope IDCAMS will work for this. Using 3.4 get all list of datasets having A.B*.*.*, after it save this list. Once you get list, then you can easily DELETE these datasets using IDCAMS.
Ex-
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE A.BXY.ADC.BWZ
Correct me anyone if I am wrong. |
|
| Back to top |
|
 |
gcicchet
Active User
Joined: 28 Jul 2006 Posts: 295
|
|
|
|
Hi,
I used the following code and it worked for me.
| Code: |
//BACKUP EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//FILTLST DD *
INCLUDE( -
CSDTG1.Y*.*.* -
CSDTG1.H*.*.* -
// DD *
)
//FILEBACK DD DUMMY
//SYSIN DD *
DUMP OUTDD(FILEBACK) -
TOL(ENQF) -
DATASET(FILTERDD(FILTLST)) -
DELETE -
PURGE
//*
//**********************************************************************
|
Gerry |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 2435 Location: Brussels once more ...
|
|
|
|
| Yip, Gerry has the easiest answer |
|
| Back to top |
|
 |
anoopn1985
New User
Joined: 23 Apr 2007 Posts: 7 Location: tvm
|
|
|
|
| Thanks Gerry...Thank u very much...It is working fine................. |
|
| Back to top |
|
 |
|
|