Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Historical/statistical details for me... elixir1986 TSO/ISPF 13 Wed Aug 30, 2017 9:02 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts change string before sertan string anatol DFSORT/ICETOOL 8 Tue Aug 15, 2017 5:43 pm
No new posts RFE: DB2 support for mixed case names. Pedro DB2 0 Tue Jul 04, 2017 1:32 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us