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
 
Deleting multiple PDSs with a single command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM
Author Message
raveendra_ibm
Currently Banned

New User


Joined: 07 Jan 2006
Posts: 45

PostPosted: Tue Apr 04, 2006 9:51 am    Post subject: Deleting multiple PDSs with a single command
Reply with quote

Hi All,

Is there a way out to delete multiple PDS or PS using a single command. Something similar to this :
I want to delete following PDSs' (along with the members in it)

MYPDS.TEST.COB
MYPDS.TEST.JCL
MYPDS.TEST.TST
MYPDS.TEST.LOAD
MYPDS.TEST.OBJ

using MYPDS.TEST.* with a single command, instead of deleting each one of them individually.

Please help.

Thanks and Regards,
Raveendra.
Back to top
View user's profile Send private message
References
superk

Moderator Team Head


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

PostPosted: Tue Apr 04, 2006 5:53 pm    Post subject: Re: Deleting multiple PDSs with a single command
Reply with quote

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                 
//*                                       


With the PARM='TYPRUN=NORUN' specified, nothing will actually be deleted, so you can review what will actually be processed. When you are sure it will do what you need, remove the PARM statement and run it again.
Back to top
View user's profile Send private message
raveendra_ibm
Currently Banned

New User


Joined: 07 Jan 2006
Posts: 45

PostPosted: Tue Apr 04, 2006 6:36 pm    Post subject: Re: Deleting multiple PDSs with a single command
Reply with quote

Hi Superk !!!

Thanks for your reply. I'll try it out.

Regards,
Raveendra.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Apr 04, 2006 6:59 pm    Post subject: Re: Deleting multiple PDSs with a single command
Reply with quote

Just a warning - you have to have the proper authorization to use that utility.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 278
Location: Basel, Switzerland

PostPosted: Tue Apr 04, 2006 7:20 pm    Post subject:
Reply with quote

hy raveendra_ibm,

just use IDCAMS

give in dd-SYSIN

DELETE MYPDS.TEST.* SCRATCH

all the files with these first two qualifiers will be deleted.
but note: you can do this on full qualifiers only!
you cannot use the wildcard like MYPDS.TES* ...

for ADRDSSU you really need high rights...
IDCAMS is always available.

martin9
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM All times are GMT + 6 Hours
Page 1 of 1