Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
REXX code to delete some of the members in a PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
brindha christy

New User


Joined: 26 Aug 2008
Posts: 20
Location: India

PostPosted: Wed Nov 19, 2008 10:38 am    Post subject: REXX code to delete some of the members in a PDS
Reply with quote

I need a REXX code, which could delete all of the members starting with charector AB in a PDS. The PDS would have many of other members. only the members starting with AB should be deleted.

Is this possible?

Can anyone suggest how?
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Wed Nov 19, 2008 10:57 am    Post subject: Re: REXX code to delete some of the members in a PDS
Reply with quote

brindha christy wrote:
Is this possible?

Can anyone suggest how?


- Create a member list.
- Loop through the member list. For any member name where the first two characters are 'AB', issue a TSO DELETE command for the member.

<< OR >>

- Since the dataset is a PDS, IPSF Library Management (LM) Services can be used.
- Use the LMINIT Service to generate the data ID.
- Use the LMOPEN Service to open the data ID for output.
- Use the LMMLIST Service to create a member list.
- Use the LMMDEL Service to delete each member that starts with the characters 'AB'.
- Use the LMCLOSE Service to close the data ID.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Wed Nov 19, 2008 11:21 am    Post subject: Reply to: REXX code to delete some of the members in a PDS
Reply with quote

why write rexx for it...

if in ISPF you can use the member list panel and issue :

Code:
DSLIST ..........
Command ===> S AB * D
Back to top
View user's profile Send private message
brindha christy

New User


Joined: 26 Aug 2008
Posts: 20
Location: India

PostPosted: Wed Nov 19, 2008 11:56 am    Post subject: Reply to: REXX code to delete some of the members in a PDS
Reply with quote

The reason is, i am trying get it as a batch job which i would be scheduling in the flow of the rest of the jobs,
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: Wed Nov 19, 2008 8:45 pm    Post subject:
Reply with quote

Hello,

Suggest that however you do this, you back up the dataset first. An extra copy costs less than a lost dataset. . .
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us