search cancel

Copy multiple members from PDS to PANLIB with REPLACE


Article ID: 18791


Updated On:


Database Analyzer (IMS Tools) Mainframe Configuration Manager for IMS for z/OS IMS TOOLS - MISC Compress Data Compression (IMS Tools) Database Analyzer for IMS for z/OS Database Copier for IMS for z/OS Database Organizer for IMS for z/OS Mainframe Extended Terminal Manager (IMS Tools) High Performance Recovery for IMS for z/OS Database Organizer (IMS Tools) Mainframe Program Restart Manager for IMS for z/OS Secondary Index Builder for IMS for z/OS Secondary Index for IMS for z/OS JARS JARS Resource Accounting JARS SMF Director JMR MIM Resource Sharing (MIM) MIM Data Sharing (MII) MIM Tape Sharing (MIA) MIM Message Sharing (MIC) Nastel AutoPilot for WebSphere MQ PanApt PanAudit Panvalet QuickFetch Raps VSE Scheduler VSE SMR SOLVE:Operations Automation SOLVE:Access Session Management SOLVE:FTS SYSVIEW Performance Management NXBRIDGE - SYSVIEW/ENDEVOR CA 2E SOLVE



Copying from a PDS to a PANLIB is easy using PAN0, unless the members already exist.


Using the PAN0 utility to copy members for a PDS to a PANLIB is documented in

Chapter 4 of the Extended Features Guide, but PAN0 does not recognize REPLACE.

When members pre-exist in the PANLIB, this process can be used:

  1. Get size of current PANLIB - PAN#4 ++ATTRIBUTE
  2. Create new Panlib - PAN#4 ++CLEAR
  3. Copy PDS to new PANLIB - PAN#1 ++USING PAN0, ++ADD
  4. Create protection file - PAN#2 ++DUMP
  5. Copy from new to desired PANLIB - PAN#2 ++REP name1,ZZZZZZZ


  • ++CONTROL may also needed if existing PANLIB is control code protected
    or in steps 1, ,3, 4 and 5 if installation code is used at the site.
  • You cannot replace into the desired PANLIB if the member is in PRODUCTION
    status . Any member(s) that have like names and that are in production
    status in the original PANLIB would need to be renamed.

Sample JCL:

  1. Check the current space allocation
      //STEP   EXEC PGM=PAN#2                                                       //PANDD1   DD DSN=old.panlib,DISP=SHR                                //SYSPRINT DD SYSOUT=*                                                        //SYSPUNCH DD SYSOUT=*                                                        //SYSIN   DD *                                                                ++ATTRIBUTE                                                                   /*
  2. Use the number from that listing on the ++CLEAR
      //STEP     EXEC PGM=PAN#4                                     //SYSPRINT DD SYSOUT=*                                        //PANDD1   DD DSN=NEW.PANLIB,DISP=(,CATLG),         //         UNIT=SYSDA,SPACE=(CYL,(5,1)),                      //         DCB=(DSORG=PS,BLKSIZE=10790),VOL=SER=volser        //SYSIN    DD *                                               ++CLEAR DATASETS=nnnnn        # of members in the new PANLIB      /*
  3. Copy PDS to new PANLIB
      //STEP       EXEC PGM=PAN#1                                 //PANDD1      DD DSN=NEW.PANLIB,DISP=SHR           //PANDD2      DD DUMMY                                       //PANDD3      DD DUMMY                                       //INBPAM      DD DSN=YOUR.INPUT.PDS,DISP=SHR                 //INBSAM      DD DSN=YOUR.INPUT.PDS,DISP=SHR                 //SYSPRINT    DD SYSOUT=*                                    //SYSIN       DD *                                           ++USING PAN0                                                 ++ADD *                     /*
  4. Create protection file - set SPACE on PANDD2 as needed for your site
      //STEP    EXEC PGM=PAN#2                          //PANDD1  DD DISP=SHR,DSN=NEW.PANLIB                                          //PANDD2  DD DISP=(NEW,CATLG),,                        //         DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120),                              //         UNIT=SYSDA,SPACE=(CYL,(?,?))                                       //PANDD3   DD DUMMY                                                           //SYSPRINT DD SYSOUT=*                                                        //SYSPUNCH DD SYSOUT=*                                                        //SYSIN    DD *                                                               ++DUMP                                                                        ++PRINT                                                                       /*
  5. Copy from new to desired PANLIB
      //STEP    EXEC PGM=PAN#2                                                     //SYSPRINT DD  SYSOUT=*                                                       //PANDD1   DD  DSN=old.panlib,DISP=SHR                                        //PANDD2   DD  DUMMY                                                          //PANDD3   DD,DISP=SHR                               //SYSIN    DD *                                                               ++REP name1,ZZZZZZZ                                                               /* 

name1 must be an existing member name. ZZZZZZZZ must be in ascending sequence, but need not be an existing member name.

When this command is processed without any parameters, the latest version of each member on the entire protection file is restored to the PANLIB.


Component: C21E