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: 4649
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: 10274
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


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