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

Easy way to delete selected members from Loadlib in batch


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kenneth Kussman

New User


Joined: 08 Mar 2021
Posts: 1
Location: usa

PostPosted: Wed Feb 09, 2022 7:11 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Wed Feb 09, 2022 7:36 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Wed Feb 09, 2022 7:39 pm
Reply with quote

...del...
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Wed Feb 09, 2022 7:43 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Wed Feb 09, 2022 7:49 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Wed Feb 09, 2022 7:55 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Wed Feb 09, 2022 10:51 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Wed Feb 09, 2022 11:00 pm
Reply with quote

[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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Wed Feb 09, 2022 11:08 pm
Reply with quote

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. icon_biggrin.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Wed Feb 09, 2022 11:29 pm
Reply with quote

Hum-m-m...

This discussion on the "automation" takes already several hours, while the manual task itself would take 30 seconds. 2014.gif
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Wed Feb 09, 2022 11:35 pm
Reply with quote

sergeyken wrote:
Hum-m-m...

This discussion on the "automation" takes already several hours, while the manual task itself would take 30 seconds. 2014.gif

Think Big!
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Thu Feb 10, 2022 1:09 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Thu Feb 10, 2022 1:56 pm
Reply with quote

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. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
Search our Forums:

Back to Top