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 a set of datasets with a wildcard ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Wed Jan 31, 2007 8:38 pm    Post subject: How to Delete a set of datasets with a wildcard ?
Reply with quote

How can you delete a set of datasets using a wildard?
Example:

If I have the following datasets:

HLVL.XXX.YYY.TEST1
HLVL.XXX.YYY.TEST2
HLVL.XXX.YYY.TEST3.abc
HLVL.XXX.YYY.TEST4
HLVL.XXX.YYY.TEST5
HLVL.XXX.YYY.TEST6.xyz
etc..

and I want to to delete in a bacth jcl job
all datasets that start with:

HLVL.XXX.YYY.T*

Thanks
Back to top
View user's profile Send private message

yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Wed Jan 31, 2007 10:24 pm    Post subject: Re: How to Delete a set of datasets with a wildcard ?
Reply with quote

found the answer in SMS & VSAM forum...sorry for the post..

http://ibmmainframes.com/viewtopic.php?t=10190&highlight=adrdssu

Code:
//STEP0010  EXEC PGM=ADRDSSU,REGION=0M,PARM='TYPRUN=NORUN'
//SYSPRINT  DD   SYSOUT=*                 
//DELETE    DD   DUMMY                   
//SYSIN     DD   *                       
  DUMP DATASET(INCLUDE(MYPDS.TEST.*)) -   
    OUTDD(DELETE) DELETE                 
//*
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 Jan 31, 2007 10:27 pm    Post subject: Re: How to Delete a set of datasets with a wildcard ?
Reply with quote

Just note that you have to use the level down to the node, i.e.

HLVL.TTT.YYY.TEST1.*
HLVL.TTT.YYY.TEST2.*

will work

HLVL.TTT.YYY.TEST*
or
HLVL.TTT.YYY.T*

will not.
Back to top
View user's profile Send private message
dgokulakrishnan

New User


Joined: 01 Jun 2011
Posts: 5
Location: Chennai

PostPosted: Thu Sep 01, 2011 1:13 pm    Post subject:
Reply with quote

Hi Yianis..

Even the below code snippet also deletes the dataset by using the wildcards.

//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DELETE HLVL.XXX.YYY.*
/*
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 Sep 01, 2011 8:38 pm    Post subject: Reply to: How to Delete a set of datasets with a wildcard ?
Reply with quote

Hello and welcome to the forum,

Please note that it is best to reply to curretly active topics rather than one that is over 4 years inactive. . . icon_wink.gif

d
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 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 Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm


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