Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to delete multiple datesets with name A.B.*

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
anoopn1985

New User


Joined: 23 Apr 2007
Posts: 7
Location: tvm

PostPosted: Wed May 14, 2008 5:49 pm    Post subject: How to delete multiple datesets with name A.B.*
Reply with quote

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
View user's profile Send private message
References
PostPosted: Wed May 14, 2008 5:49 pm    Post subject: Re: How to delete multiple datesets with name A.B.* Reply with quote

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3001
Location: Charlotte,NC USA

PostPosted: Wed May 14, 2008 5:52 pm    Post subject: Reply to: How to delete multiple datesets with name A.B.*
Reply with quote

See either of these previous topics from this week:

http://www.ibmmainframes.com/viewtopic.php?t=30638
http://www.ibmmainframes.com/viewtopic.php?t=30566
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 138
Location: At my Desk

PostPosted: Wed May 14, 2008 5:54 pm    Post subject: Re: How to delete multiple datesets with name A.B.*
Reply with quote

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
View user's profile Send private message
anoopn1985

New User


Joined: 23 Apr 2007
Posts: 7
Location: tvm

PostPosted: Thu May 15, 2008 10:03 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6726
Location: 221 B Baker St

PostPosted: Thu May 15, 2008 10:56 am    Post subject:
Reply with quote

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
View user's profile Send private message
anoopn1985

New User


Joined: 23 Apr 2007
Posts: 7
Location: tvm

PostPosted: Thu May 15, 2008 10:59 am    Post subject:
Reply with quote

Dick,

How to generate the dataset names?
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6726
Location: 221 B Baker St

PostPosted: Thu May 15, 2008 11:08 am    Post subject:
Reply with quote

Hello,

You can create the dsn list using tso/ispf 3.4 and save the list to disk.

Look at this (found using "SEARCH" at the top of the page):
http://ibmmainframes.com/viewtopic.php?t=27509&highlight=dataset+list

SEARCH can save you a lot of time and frustration icon_smile.gif
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 70
Location: INDIA

PostPosted: Thu May 15, 2008 11:13 am    Post subject:
Reply with quote

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
View user's profile Send private message
gcicchet

Active User


Joined: 28 Jul 2006
Posts: 295

PostPosted: Thu May 15, 2008 11:19 am    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 2435
Location: Brussels once more ...

PostPosted: Thu May 15, 2008 11:25 am    Post subject:
Reply with quote

Yip, Gerry has the easiest answer
Back to top
View user's profile Send private message
anoopn1985

New User


Joined: 23 Apr 2007
Posts: 7
Location: tvm

PostPosted: Thu May 15, 2008 11:29 am    Post subject:
Reply with quote

Thanks Gerry...Thank u very much...It is working fine.................
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1