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

Delete PDS members without deleting dataset itself


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
jaydeb

New User


Joined: 17 Oct 2005
Posts: 9
Location: Pune

PostPosted: Tue Oct 30, 2007 2:39 pm
Reply with quote

I want to delete the members of a PDS dataset without deleting the dataset itself. Here, I don't know the exact number of members the PDS dataset is having, may be 100 or more.
How to write a job to delete these members of the PDS.

Thanks & Regards,
Jaydeb
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Oct 30, 2007 2:47 pm
Reply with quote

Do You want to delete all the members or selectively ??

there are tools available to "empty/reset" the directory of a PDS/PDSE

the members You want to delete have some common patterns..

for example delete members starting_with or containing some string
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Oct 30, 2007 2:53 pm
Reply with quote

if it is one time task You can

go to ispf option 3.4
list Your dataset
choose the option m

on the command line issue the command

s * d

to delete all the members ( You can in the next panel turn confirm off )

or for a pattern

s aa* d

same as before

after deletion it would be better to compress te dataset if PDS
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Oct 30, 2007 2:54 pm
Reply with quote

Here's a couple of previous topics that may be relevant:

ibmmainframes.com/about6047.html
ibmmainframes.com/about16738.html
Back to top
View user's profile Send private message
jaydeb

New User


Joined: 17 Oct 2005
Posts: 9
Location: Pune

PostPosted: Tue Oct 30, 2007 3:18 pm
Reply with quote

Hi All,

Thanks all for your help. I found ispf option 3.4 option more convenient.
Anyway, Thanks again to you all.

Thanks & Regards,
Jaydeb
Back to top
View user's profile Send private message
Priya_1985

New User


Joined: 06 Oct 2008
Posts: 3
Location: Hyderabad

PostPosted: Sat Oct 18, 2008 11:42 am
Reply with quote

Hi all

u hav a option S * d,for deleting selectively members..is there any command to delete the PDS selectively at a time.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Oct 18, 2008 8:03 pm
Reply with quote

Hello,

Quote:
is there any command to delete the PDS selectively at a time
Please clarify - showing an example would help.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Sat Oct 18, 2008 8:51 pm
Reply with quote

Using REXX you can list the PDS members and then delete them one by one.

There are numerous examples of using REXX to list a PDS on this forum, and all you need to do is to invoke IDCAMS in the REXX to delete them.
Back to top
View user's profile Send private message
justjpr

New User


Joined: 03 Nov 2022
Posts: 33
Location: INDIA

PostPosted: Wed Jul 24, 2024 9:39 pm
Reply with quote

Sorry for answering to a very old post (I thought it is useful for reference). Today I had similar requirement. I did it in JCL. Code the TSO delete command in the SYSTSIN DD using EXEC PGM=IKJEFT01.

Code:
//SYSTSIN  DD  *                     
  DELETE 'A001.JP.JOBLIB(*)'
/* 


SDSF OUTPUT

Code:
 COMMAND INPUT ===>                                         
********************************* TOP OF DATA **************
READY                                                       
  DELETE 'A001.JP.JOBLIB(*)'                     
ALL MEMBERS IN DATA SET A001.JP.JOBLIB  DELETED   
READY                                                       
END                                                         
******************************** BOTTOM OF DATA ************
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Jul 24, 2024 10:07 pm
Reply with quote

a new guinness ...
a topic resurrected for no reason after 17 SEVENTEEN years

when the TS ( topic starter ) writes

Quote:
Thanks all for your help. I found ispf option 3.4 option more convenient.
Anyway, Thanks again to you all.


any additional post is just a waste of resources
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Thu Jul 25, 2024 4:49 pm
Reply with quote

Topic locked. Please start a new post.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts Reading Empty Dataset DFSORT/ICETOOL 5
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
No new posts SPOOL to Mainframe dataset in batch mode JCL & VSAM 7
No new posts DELETE SPUFI DB2 1
Search our Forums:

Back to Top