View previous topic :: View next topic
|
Author |
Message |
bhagyac
New User
Joined: 17 Apr 2008 Posts: 44 Location: bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or do it in one single REXX step |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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) |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
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 |
|
|
|