IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to delete multiple datesets with name A.B.*


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anoopn1985

New User


Joined: 23 Apr 2007
Posts: 16
Location: tvm

PostPosted: Wed May 14, 2008 5:49 pm
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
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed May 14, 2008 5:52 pm
Reply with quote

See either of these previous topics from this week:

www.ibmmainframes.com/viewtopic.php?t=30638
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: 218
Location: India

PostPosted: Wed May 14, 2008 5:54 pm
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: 16
Location: tvm

PostPosted: Thu May 15, 2008 10:03 am
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 15, 2008 10:56 am
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: 16
Location: tvm

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

Dick,

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 15, 2008 11:08 am
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: 103
Location: INDIA

PostPosted: Thu May 15, 2008 11:13 am
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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu May 15, 2008 11:19 am
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: 8797
Location: Welsh Wales

PostPosted: Thu May 15, 2008 11:25 am
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: 16
Location: tvm

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

Thanks Gerry...Thank u very much...It is working fine.................
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top