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
 

 

Renaming Members of a PDS/PDSE with Wildcards

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
fesar

New User


Joined: 30 May 2008
Posts: 2
Location: Chennai

PostPosted: Fri Jan 27, 2012 4:34 pm    Post subject: Renaming Members of a PDS/PDSE with Wildcards
Reply with quote

Hi,

Is there a way to Rename members of a PDS using Wild Cards. Like this

AAA.BBB.CCC(AAA*) to AAA.BBB.CCC(BBB*)

All the members starting with AAA will be renamed with BBB.

Currently in SAS this is being achieved by

PROC PDS; DDNAME
CHANGE AAAA:=BBBB:;

We are removing SAS and we need to do it with some other utility.


Regards,
Francis.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jan 27, 2012 4:51 pm    Post subject: Reply to: Renaming Members of a PDS/PDSE with Wildcards
Reply with quote

not out of the box,
but searching the forum for MEMBER RENAME will return a few topics with hints on how to do it
for example
http://ibmmainframes.com/viewtopic.php?t=10936&highlight=pds+member+rename
Back to top
View user's profile Send private message
fesar

New User


Joined: 30 May 2008
Posts: 2
Location: Chennai

PostPosted: Fri Jan 27, 2012 6:12 pm    Post subject: Thanks
Reply with quote

Thanks a lot. Will try out that options. If there are any other options someone got do let me know.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jan 27, 2012 6:27 pm    Post subject: Reply to: Renaming Members of a PDS/PDSE with Wildcards
Reply with quote

Quote:
If there are any other options someone got do let me know.

the remark is improper and impolite
we reply on our own time and free of charge
to expect people to reply is ...

the habit is to post solutions suited for a vanilla environment
( the zOS standard product set )

most probably there are products that might do that out of the box,
point them out is pretty useless, Your organization might not have them.
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Sat Jan 28, 2012 12:31 am    Post subject:
Reply with quote

Here is a sample REXX code which I use to change the last 2 character of my member name present in a PDS. Conditions can be added for selective renaming.
Code:
/* REXX */                                             
/* GIVE THE I/P PDS */                                 
INPUTPDS = give-inputpds         
X = OUTTRAP('L.')                                     
"LISTDS '"INPUTPDS"' MEMBERS"                         
X = OUTTRAP('OFF')                                     
DO LOOP = 7 TO L.0                                     
  OLDMEM = STRIP(L.LOOP)                               
  /*CHANGE THE ROUTE CODE */                           
  NEWMEM = SUBSTR(OLDMEM,1,6)'9U'                     
"RENAME '"INPUTPDS"("OLDMEM")' '"INPUTPDS"("NEWMEM")'"
END     
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Sat Jan 28, 2012 12:53 am    Post subject:
Reply with quote

nkumar wrote:
Here is a sample REXX code which I use to change the last 2 character of my member name present in a PDS. Conditions can be added for selective renaming.
Code:
/* REXX */                                             
/* GIVE THE I/P PDS */                                 
INPUTPDS = give-inputpds         
X = OUTTRAP('L.')                                     
"LISTDS '"INPUTPDS"' MEMBERS"                         
X = OUTTRAP('OFF')                                     
DO LOOP = 7 TO L.0                                     
  OLDMEM = STRIP(L.LOOP)                               
  /*CHANGE THE ROUTE CODE */                           
  NEWMEM = SUBSTR(OLDMEM,1,6)'9U'                     
"RENAME '"INPUTPDS"("OLDMEM")' '"INPUTPDS"("NEWMEM")'"
END     

And what happens when the member name is less than six characters long? (Hint: nothing good.)
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Sat Jan 28, 2012 2:10 am    Post subject:
Reply with quote

Quote:
And what happens when the member name is less than six characters long? (Hint: nothing good.)


This code was just meant to be an example. Obviously whoever wants to reuse, will have to tweak it as per his need.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Sat Jan 28, 2012 2:24 am    Post subject:
Reply with quote

nkumar wrote:
Quote:
And what happens when the member name is less than six characters long? (Hint: nothing good.)


This code was just meant to be an example. Obviously whoever wants to reuse, will have to tweak it as per his need.

Well, it's certainly a comfort to me in my declining years to know that at least one sotfware engineer is comfortably ensconced in a environment where the names of PDS members are guaranteed to be at least six characters long.
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Sat Jan 28, 2012 2:32 am    Post subject:
Reply with quote

Quote:
Well, it's certainly a comfort to me in my declining years to know that at least one sotfware engineer is comfortably ensconced in a environment where the names of PDS members are guaranteed to be at least six characters long.


Well..when you follow the standards life always become comfortable. icon_smile.gif icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Jan 28, 2012 2:45 am    Post subject:
Reply with quote

Quote:
Well..when you follow the standards life always become comfortable.

that means when everything goes haywire, you can blame someone else.

not my fault, i followed the rules.....
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Sat Jan 28, 2012 2:50 am    Post subject:
Reply with quote

Quote:
that means when everything goes haywire, you can blame someone else.


How did you come to this conclusion?
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reasonable way of checking wildcards ... sergeyken CLIST & REXX 5 Wed Sep 07, 2016 8:43 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts Editing "member generations"... Ricardo Viegas TSO/ISPF 1 Tue Dec 29, 2015 7:27 pm
No new posts JCL to replace string in all PDS members bhamarekm All Other Mainframe Topics 8 Thu May 28, 2015 8:44 pm


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