View previous topic :: View next topic
|
Author |
Message |
Kenneth Kussman
New User
Joined: 08 Mar 2021 Posts: 1 Location: usa
|
|
|
|
I have a LOALIB with 100 members. I want to delete 90 members from this LOADLIB with one job in batch.
Is there a IBM utility I can use ?
If not any other options ?
Thanks |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2174 Location: USA
|
|
|
|
I bet: for 90 members out of 100 - the fastest and the simplest way to do this would be: typing the line-command 'D' next to each member name on the panel displayed in ISPF EDIT. I personally can do it in less than 30 seconds. One extra trick: copy-paste the vertical column of 'D' commands from one screen to the next one (with manual exclusion of 'D' where not needed).
Using any utility may take from 5 minutes (for those who knows what and how to use), to 5 hours (for those who has never tried it before).
Asking for help from a forum may take up to 5 days, to get the same result. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2174 Location: USA
|
|
|
|
...del... |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1370 Location: Bamberg, Germany
|
|
|
|
You can use IDCAMS to delete members. But it might really be faster to do it manually, unless pattern can be applied. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2174 Location: USA
|
|
|
|
One possible workaround when deleting 90% of all members.
1. Use PGM=IEBCOPY with SELECT MEMBER= for 10% of needed members to be copied to a temporary library.
2. Use either
DISP=(OLD,DELETE),DSN=oldname
or
DELETE oldname in IDCAMS utility.
3. Use RENAME to change DSNAME of temporary library to the original DSNAME.
P.S.
With this approach, the list of SELECT MEMBER= commands can be easily generated by any simple tool, or just manually created in ISPF EDIT via copy-paste of member list from 3.4 VIEW to the position right after prepared SELECT MEMBER= column of statements. |
|
Back to top |
|
 |
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 593 Location: London
|
|
|
|
PDSM32 will do it if you have PDSMAN installed.
Otherwise in ISPF EDIT mode just type DEL next to the first member and = on all subsequent ones you want deleted.
Or type //DEL next to the first member and // next to the last one you want to delete and it does a block delete. Obvious don't include the members you want within the block.
Otherwise copy your PDS to a backup, delete the original (or run PDSM10 to empty it), and just copy the members you want back from the backup. |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1370 Location: Bamberg, Germany
|
|
|
|
Pete Wilson wrote: |
PDSM32 will do it if you have PDSMAN installed.
Otherwise in ISPF EDIT mode just type DEL next to the first member and = on all subsequent ones you want deleted.
Or type //DEL next to the first member and // next to the last one you want to delete and it does a block delete. Obvious don't include the members you want within the block.
Otherwise copy your PDS to a backup, delete the original (or run PDSM10 to empty it), and just copy the members you want back from the backup. |
IDCAMS works pretty well and can deal with Wildcards too.
Code: |
DEL '<your_dsn>(DCOLL%LA)' FILE(DD0) |
Obviously you have to code a DD:DD0 when the DSN is in shared use. |
|
Back to top |
|
 |
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 593 Location: London
|
|
|
|
[quote="Joerg.Findeisen"]
Pete Wilson wrote: |
PDSM32 will do it if you have PDSMAN installed.
IDCAMS works pretty well and can deal with Wildcards too.
Code: |
DEL '<your_dsn>(DCOLL%LA)' FILE(DD0) |
Obviously you have to code a DD:DD0 when the DSN is in shared use. |
Yes, the DELETE option is much improved by that addition of MASK. Pity they haven't put that into LISTCAT fully! |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1370 Location: Bamberg, Germany
|
|
|
|
Pete Wilson wrote: |
Yes, the DELETE option is much improved by that addition of MASK. Pity they haven't put that into LISTCAT fully! |
There is no MASK keyword required in the deletion of Members.  |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2174 Location: USA
|
|
|
|
Hum-m-m...
This discussion on the "automation" takes already several hours, while the manual task itself would take 30 seconds.  |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1370 Location: Bamberg, Germany
|
|
|
|
sergeyken wrote: |
Hum-m-m...
This discussion on the "automation" takes already several hours, while the manual task itself would take 30 seconds.  |
Think Big! |
|
Back to top |
|
 |
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 593 Location: London
|
|
|
|
I have used MASK to get rid of some crap NON-SMS datasets that someone managed to create with member names though...as in the dataset name included the member name in brackets.
e.g. TEST.DATA.SET(MEMNAME1)
I think it was like this, was a while ago:
DEL 'TEST.DATA.SET(*)' MASK |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1370 Location: Bamberg, Germany
|
|
|
|
Pete Wilson wrote: |
I have used MASK to get rid of some crap NON-SMS datasets that someone managed to create with member names though...as in the dataset name included the member name in brackets.
e.g. TEST.DATA.SET(MEMNAME1)
I think it was like this, was a while ago:
DEL 'TEST.DATA.SET(*)' MASK |
Ok, I can follow now and can also imagine how that crap was created. Thanks for explaining your point.  |
|
Back to top |
|
 |
|