MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rename members of PDS with search criteria

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
info_seeker
Beginner


Joined: 31 Jan 2005
Posts: 27
Topics: 9

PostPosted: Thu Jan 19, 2006 3:18 pm    Post subject: Rename members of PDS with search criteria Reply with quote

Hi,

I have 100 members in a PDS. I want to replace the first two characters of member names, whose names meet a specific criteria. For eg: all the memebrs whose name is starting with TU needs to be changed to PR. Is there a way to tackle this?

Cheers!
Back to top
View user's profile Send private message
German Castillo
Beginner


Joined: 23 Dec 2005
Posts: 83
Topics: 2
Location: Caracas, Venezuela

PostPosted: Thu Jan 19, 2006 3:39 pm    Post subject: Reply with quote

hi Info Seeker

The first part is easy, determine which members meet your criteria, this rexx should work or at least give you the starting point to do it:

Code:

/*Rexx*/
...
/*place your dsn in the DSN Var*/
x = Outtrap('Mem.')                                       
"LISTD '"Dsn"' MEMBERS"                                   
x = Outtrap('OFF')                                         

Do iMem = 1 To Mem.0                                       
  If Mem.iMem = "--MEMBERS--" Then Leave                   
End                                                       

Do iMem = iMem + 1 To Mem.0
If Left( Mem.I, 2) /= "TV" Then iterate
Call Rename                               
End
....   

rename:
...
                                                       


Now for the rename procedure you can do several things,
a) to generate IEBCOPY SYSIN cards to be execute after the current step finishes, of course this sysin cards should have the proper IEBCOPY with the rename parms, maybe the original member will stay as well.

b) Use any other renaming program

c) use the LMM* ISPF services to do it inside the Rexx procedure
_________________
Best wishes,

German Castillo
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Thu Jan 19, 2006 4:10 pm    Post subject: Reply with quote

Hi -

I wrote a REXX utility with the following capabilities:
- Renaming members based on patterns and positions of characters.
- Batch or online invocation.
- Implemnting the renamed member names in the source of other library (for example - if you rename members in PROC library, you may want to change you JCL sources, too)
- Full log capabilities.

It it quite big, so I can't put it here, but if you want it, give me your maill address and I'll send it to you.

O.
________
Chrysler ecoVoyager


Last edited by ofer71 on Sat Feb 05, 2011 11:29 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
info_seeker
Beginner


Joined: 31 Jan 2005
Posts: 27
Topics: 9

PostPosted: Fri Jan 20, 2006 11:17 am    Post subject: Reply with quote

Hey Ofer71,

Could you please sent that to hercules7931@yahoo.com.

Help much appreciated.

Cheers!!!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Jan 20, 2006 11:23 am    Post subject: Reply with quote

info_seeker,

Do you have fileaid at your shop?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
info_seeker
Beginner


Joined: 31 Jan 2005
Posts: 27
Topics: 9

PostPosted: Wed Jan 25, 2006 3:14 pm    Post subject: Reply with quote

Yes.. Kolusu.. We have File Aid. Do you have any solution with that?
Back to top
View user's profile Send private message
info_seeker
Beginner


Joined: 31 Jan 2005
Posts: 27
Topics: 9

PostPosted: Fri Jan 27, 2006 2:32 pm    Post subject: Reply with quote

Hi Kolusu,

I foud the method to do that with fileaid.
The following instream card worked for chaging members starting with V0P1 to N0T3
$$DD01 COPYMEM PADCHAR=X'00',CEM=NO,RLM=YES,
NEWMEMS=N0T3????,
MEMBER=(V0P1XX1,V0P1XXX2,V0P1XXX3,V0P1XXX4,V0P1XXX5,
V0P1XXX6,V0P1XXX8,V0P1XXX9)

You guided me Kolusu.. Thank you so much...
Thanks to Ofer for sending the REXX. That was an amazing tool... Three Cheers!!!

-Info Seeker
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group