IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

want to replace a particular char for rename purpose


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 57
Location: chennai

PostPosted: Sat May 10, 2008 2:36 pm
Reply with quote

Hi all,
I have a tricky question.I have just come with a requirement
that i have to copy few members of a data set to another data set
if those member are there in a third dataset..
Now after copying i have to change the naming convention of the
member..
ex: like
GZSDATE should be changed to GZNDATE
mean third char S has to be replace with N for every member.Can i
do it by submitting a job or writing a cobol program.I have thousands
lots of member in the library to change.So maually its very mechanical
and tiring..

thanks in advance for your help.....
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat May 10, 2008 2:51 pm
Reply with quote

Hello,

You need to post a complete set of "rules".

Please create an example list of the member names in the 3 partitioned datasets and describe how you want your process to work (including an external list of member names to process). The last part of the description will be the list of member names in all 3 datasets after your process is run.

Once the rules are understood, it will be possible to generate the needed jcl and control statements to do what you need.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 57
Location: chennai

PostPosted: Tue May 13, 2008 7:28 pm
Reply with quote

hi dick,
what i m doing is creating a clone region for the testing purpose for the
production library.now in new library i have to copy all the
runbooks from production.its contains a lots of member.I have copied
it.But the problem is i have to change the naming convention according
to the new region for example.
if its in prodution region GZSBKUP1
TO GZMBKUP1.I mean i have to changed only third charecter.i m doing it
manually..can i do by some program or job itself..
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Tue May 13, 2008 7:43 pm
Reply with quote

Purnendu.it wrote:
if its in prodution region GZSBKUP1
TO GZMBKUP1.


Hi,

I did same kind of work sometime before... You can use 'ADRDSSU', make search on ADRDSSU, there are many good postings on it.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue May 13, 2008 10:24 pm
Reply with quote

Hello,

Quote:
i m doing it manually..can i do by some program or job itself..
Sure, you can.

Create a list of all of the members for some pds to be copied/renamed.

Read the list and generate the jcl to copy each member from the old pds(mbrname) to the new pds(mbrname) and submit the generated jcl thru the internal reader. Make sure to do less than 255 per job.

If you are not familiar with the internal reader, there are multiple topics in the forum.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed May 14, 2008 6:05 pm
Reply with quote

Hi,

You can also try IEHPROGM to rename the members. Do a 3.4 then SAVE the member list: SAVE any 1-8 pos name.

This creates a PS file w/a DSN in the form: yrTSOid.1-8pos.MEMBERS. It contains a copy of the display created by 3.4. Edit that file to conform to the RENAME stmt, and use an overlay move (M/OO-OO), then use the result as the SYSIN to IEHPROGM.
Code:
RENAME VOL=disk=222222,DSNAME=yourDSN,NEWNAME=        ,MEMBER=


See the IBM Manuals section here (click manuals at top of this screen and look for IBM JCLUtilities Guide etc.) for details on IEHPROGM.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top