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
 

 

Delete all the members in a PDS except few

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

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Tue Dec 28, 2010 6:35 pm    Post subject: Delete all the members in a PDS except few
Reply with quote

Hi all,

I want to delete all the members in a PDS except the partical member(4 members) using a job(JCL).

Can any one give some idea please?

Thank you.
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: Tue Dec 28, 2010 7:07 pm    Post subject:
Reply with quote

With the amount of information that you have given, NO

Try to think about what we need to know to help you before posting and save everyones time.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Dec 28, 2010 7:07 pm    Post subject: Reply to: Delete all the members in a PDS except few
Reply with quote

Sure. Create the list of all members (TSO LISTDS), exclude those you want to keep and then build a series of DELETE statemements from the result (SORT). Then run the deletes (TSO DELETE).
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: Tue Dec 28, 2010 7:10 pm    Post subject:
Reply with quote

Or do it in one single REXX step
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Wed Dec 29, 2010 8:01 pm    Post subject:
Reply with quote

An alternative is to allocate a new PDS with the same DCB properties, copy the 4 members to be retained into that dataset, and discard or rename the old dataset.

If you delete a lot of members repetitively, you will soon run out of either directory space and/or data space, as deleted members will not physically be deleted, unless you compress the dataset afterwards.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Dec 30, 2010 12:17 am    Post subject:
Reply with quote

Kjeld wrote:
If you delete a lot of members repetitively, you will soon run out of either directory space and/or data space....
Directory space is always reclaimed because the directory blocks are rewritten. You are correct about data space, unless a PDSE is used.
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 Dec 30, 2010 2:47 am    Post subject:
Reply with quote

Hello,

If only a few were to be "saved", i'd use the new pds approach rather than deleting the majority.

Seems to me that this would be far less effort as well as there would be no space consideration (assuming the new pds is allocated at the same size as the original) icon_smile.gif
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Dec 30, 2010 2:17 pm    Post subject:
Reply with quote

Bill Dennis wrote:
Kjeld wrote:
If you delete a lot of members repetitively, you will soon run out of either directory space and/or data space....
Directory space is always reclaimed because the directory blocks are rewritten. You are correct about data space, unless a PDSE is used.

Directory blocks will be rewritten allright, but if you dont't compress, deleted member information will still be in the directory, just marked 'deleted'.
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 Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm


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