Copy all members to new PANLIB and rename them
search cancel

Copy all members to new PANLIB and rename them

book

Article ID: 56348

calendar_today

Updated On:

Products

Panvalet

Issue/Introduction

How to copy all members to new Panvalet library and also rename them? 

Resolution

STEP1: Copy all members to new PANLIB using the ++OPTION OUTPUT and ++TRANSFER commands.

Sample JCL:

//STEP01  EXEC PGM=PAN#2
//SYSPRINT DD SYSOUT=*
//PANDD1   DD DSN=YOUR.PANLIB.OLD,DISP=SHR
//PANDD2   DD DSN=YOUR.PANLIB.NEW,DISP=SHR
//SYSIN    DD *
++OPTION OUTPUT
++TRANSFER member,9999999999
/*
//
      The member means the member name you want to start the copy process
      The 9999999999 means last member name in the PANLIB.


STEP2: Create the SYSIN card to rename it by the ++USING PGP, +-RENAME ,and ++PRINT 0-UP commands.

Sample JCL:

//STEP02  EXEC PGM=PAN#2
//SYSPRINT DD SYSOUT=*
//PANDD1   DD DSN=YOUR.PANLIB.NEW,DISP=SHR
//SYSPUNCH DD DSN=YOUR.SYSPUNCH.FILE,UNIT=SYSDA,
//         DISP=(,CATLG,DELETE),SPACE=(CYL,(1,1)),
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
//SYSIN    DD *
++USING PGP
+-RENAME ,
++PRINT 0-UP
/*
//
       The PGP means the Panvalet Group Processor.
       The +-RENAME , is used when creating the SYSIN card of ++RENAME for all the members.
       The SYSIN card is created by using the directory information of ++PRINT 0-UP.


STEP3: Modify the created SYSIN card(DSN=YOUR.SYSPUNCH.FILE) for new member name.

Before:
++RENAME     PANVLT01,
++RENAME     PANVLT02,
++RENAME     PANVLT03,
++RENAME     PANVLT04,
++RENAME     PANVLT05,

After:
++RENAME     PANVLT01,newmem01
++RENAME     PANVLT02,newmem02
++RENAME     PANVLT03,newmem03
++RENAME     PANVLT04,newmem04
++RENAME     PANVLT05,newmem05


STEP4: Rename all members by the modified SYSIN card.

//STEP03  EXEC PGM=PAN#1
//SYSPRINT DD SYSOUT=*
//PANDD1   DD DSN=YOUR.PANLIB.NEW,DISP=SHR
//SYSIN    DD DSN=YOUR.SYSPUNCH.FILE,DISP=SHR
//