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
 

 

how to globally change pds members prefix names

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

New User


Joined: 26 Jul 2006
Posts: 24

PostPosted: Fri Jul 06, 2007 7:07 am    Post subject: how to globally change pds members prefix names
Reply with quote

hi! I need some help!

I want to create a job (JCL) to copy 100 PDS members into a temp PDS daily and then rename the prefix of the 100 members in the temp PDS.

For Example:
PDS 1
PDS.AAAA.member(XXmem1, XXmem2......XXmem100)

Copy to

PDS 2
PDS.BBB.member(YYmem1, YYmem2....YYmem100)

I know I can use IEBCOPY to copy 100 members from PDS.AAA.member to PDS.BBB.member. But how to globally change all prefix from XX to YY for all 100 members? So it will be XXmem1 to YYmem1...and so on.

Please help!
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jul 06, 2007 8:37 am    Post subject: Re: how to globally change pds members prefix names
Reply with quote

You can do this using REXX.

-Read all the members of the PDS in a stem variable
-Read one member at a time and copy it to a diff PDS with a new member name
- Keep repeating this till the last member
Back to top
View user's profile Send private message
atanwc

New User


Joined: 26 Jul 2006
Posts: 24

PostPosted: Fri Jul 06, 2007 9:13 am    Post subject:
Reply with quote

Thanks! Is there anyway can use sort, copy or JCL utilities? Because I do not see any REXX in our shop.

Thanks!
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jul 06, 2007 9:33 am    Post subject: Re: how to globally change pds members prefix names
Reply with quote

There are several ways to do the renames. U can either use
IEHPROGM, IDCAMS or IKJEFT01 in batch.

continuation X shd be in the 72nd column

//RENAME JOB...
//STEP1 EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=*
//DD1 DD UNIT=SYSDA,VOL=SER=USER01,DISP=SHR
//SYSIN DD *
RENAME DSNAME=ABC.DEF.GHI, X
VOL=SYSDA=USER01, X
MEMBER=MEMBER,NEWNAME=NEW
/*
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Fri Jul 06, 2007 11:01 am    Post subject: Re: how to globally change pds members prefix names
Reply with quote

i tried this with the below control statement .... but its giving error that
"REQUIRED VOLUME COULD NOT BE MOUNTED ... UNUSUAL END"


Code:
//SYSIN DD *
  RENAME DSNAME=TEST.SYAM.JOBSNAP,VOL=SER=D21219,                      X
               NEWNAME=TEST.SYAM.JOBSNAP1
/*



Code:
  RENAME DSNAME=TEST.SYAM.JOBSNAP,VOL=SER=D21219,                      X
               NEWNAME=TEST.SYAM.JOBSNAP1
 IEH210I  YOUR REQUEST CANNOT BE SERVICED....
 IEH211I  REQUIRED VOLUME COULD NOT BE MOUNTED  ... UNUSUAL END



how to resolve this ?????
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jul 06, 2007 11:22 am    Post subject: Re: how to globally change pds members prefix names
Reply with quote

my last post was to rename a member in a PDS. but i guess u have tried renaming the whole PDS and that might be the problem.


One more thing u have given the wrong volume serial no. Just do a 3.4 and get the volume serial no and then use it in the JCL.
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: Fri Jul 06, 2007 6:40 pm    Post subject: Re: how to globally change pds members prefix names
Reply with quote

Here's another possible option:

Code:

//STEP1    EXEC PGM=IKJEFT01                           
//SYSTSPRT DD   DSN=&&SYSTSPRT,DISP=(,PASS),           
//         UNIT=VIO,SPACE=(CYL,(1,1))                 
//SYSTSIN  DD   *                                     
LISTDS 'AAA.MEMBER' MEMBERS                           
/*                                                     
//*                                                 
//STEP2    EXEC PGM=ICEMAN                           
//SORTIN   DD   DSN=&&SYSTSPRT,DISP=(OLD,PASS)       
//SORTOUT  DD   DSN=&&SORTOUT,DISP=(,PASS),         
//         UNIT=VIO,SPACE=(CYL,(1,1))               
//SYSOUT   DD   SYSOUT=*                             
//SYSIN    DD   *                                   
  OPTION COPY                                       
  OUTFIL STARTREC=9,CONVERT,INCLUDE=(5,3,CH,EQ,C' '),
    BUILD=(2X,C'SELECT MEMBER=(',                   
      8,8,SQZ=(SHIFT=LEFT,LEAD=C'(',TRAIL=C','),     
      C'YY',10,6,SQZ=(SHIFT=LEFT,TRAIL=C'))'),80:X) 
/*                                                   
//*                                                           
//STEP3    EXEC PGM=IEBCOPY                                   
//PDSI     DD   DISP=SHR,DSN=AAA.MEMBER                       
//PDSO     DD   DISP=SHR,DSN=BBB.MEMBER                       
//SYSPRINT DD   SYSOUT=*                                       
//SYSIN    DD   *                                             
  COPY INDD=((PDSI,R)),OUTDD=PDSO                             
/*                                                             
//         DD   DSN=&&SORTOUT,DISP=(OLD,PASS)                 
//*                                                           
Back to top
View user's profile Send private message
atanwc

New User


Joined: 26 Jul 2006
Posts: 24

PostPosted: Sat Jul 07, 2007 6:03 am    Post subject: Re: how to globally change pds members prefix names
Reply with quote

Thanks! I will try this next week
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts How to change dataset attributes of m... ignich7 JCL & VSAM 3 Thu Jul 21, 2016 9:17 pm


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