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
 

 

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: 4648
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: 10211
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 Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


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