Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 & VSAM
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    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

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, 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: 216
Location: India

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: 16
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

Site Director


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

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: 16
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

Site Director


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

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: 103
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

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

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: 8593
Location: Back in jolly old England

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: 16
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us