search cancel

Extract current and all archive levels of a Librarian Masterfile to a PDS

book

Article ID: 256139

calendar_today

Updated On:

Products

Librarian

Issue/Introduction

Want to copy all the members of a Librarian Master file plus all the member archive levels to a PDS.

Able to copy the current version of the members the dataset but need to copy all archive versions as well. 

Can this be done?

 

Environment

Release : 4.4

Resolution

There is no way to extract Librarian members plus their archive levels to the same PDS or PDSE.  

Each archive level has the same name as the current version so the PDS members either get replaced or not replaced (depending on the Replace option specified)  by each subsequent level. 
 
To extract an archive version of a Librarian member, you need to run a batch job. 

Each archive version will need to be extracted to a separate PDS or PDSE.
 
Here is a sample job:

//*                 
//*  RUN THE FOLLOWING JCL TO EXTRACT THE MOST CURRENT VERSION PLUS 
//*  AS MANY ARCHIVE LEVELS AS NEEDED FROM A LIBRARIAN MASTER FILE 
//*  TO SEPARATE PDS LIBRARIES  
//*                  
//DEL1    EXEC  PGM=IDCAMS 
//SYSPRINT  DD  SYSOUT=A  
//SYSIN     DD  *    
DELETE your.LIBR.OSJOB
/*                    
//*                  
//CURRSTP1     EXEC PGM=AFOLIBR,PARM='NJTA,NRJS'  
//OSJOB        DD  DSN=your.LIBR.OSJOB,DISP=(,CATLG),
//             UNIT=3390,SPACE=(CYL,(pp,ss)),VOL=SER=vvvvvv,        
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000) 
//LIST         DD  SYSOUT=* 
//MASTER       DD  DSN=your.LIBR.PRODMAST,DISP=SHR
//SYSPRINT     DD  SYSOUT=*    
//SYSIN        DD  *   
-OPT GPO,SKIPERR      
-SEL NAME=,EXEC     
-END                  
/*                    
//CURRSTP2     EXEC PGM=AFOLIBR,PARM='NJTA,NRJS'     
//STEPLIB      DD  DSN=your.LIBR.CALJLINK,DISP=SHR
//OSJOB        DD  DSN=your.LIBRCURR.LEVEL.PDS,DISP=(,CATLG),
//             UNIT=3390,SPACE=(CYL,(pp,ss,dd)),VOL=SER=vvvvvv,     
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000) 
//SYSPRINT     DD  SYSOUT=*    
//MASTER       DD  DSN=your.LIBR.PRODMAST,DISP=SHR
//SYSIN        DD  DSN=your.LIBR.OSJOB,DISP=SHR  
//*                   
//*      
//*  RUN THE FOLLOWING STEPS TO COPY THE ARCHIVE LEVELS FOR MEMBERS
//*     ON THE LIBRARIAN MASTER FILE 
//*  CHANGE -1 TO -N FOR SUBSEQUENT ARCHIVE LEVELS.  
//*  CHANGE THE PDS NAME AS WELL.  
//*                     
//DEL2    EXEC  PGM=IDCAMS 
//SYSPRINT  DD  SYSOUT=A  
//SYSIN     DD  *       
DELETE your.LIBR.OSJOB
/*                       
//*                    
//ARC1STP1     EXEC PGM=AFOLIBR,PARM='NJTA,NRJS' 
//OSJOB        DD  DSN=your.LIBR.OSJOB,DISP=(,CATLG),
//             UNIT=3390,SPACE=(CYL,(pp,ss)),VOL=SER=vvvvvv,  
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000) 
//LIST         DD  SYSOUT=*  
//MASTER       DD  DSN=your.LIBR.PRODMAST,DISP=SHR
//SYSPRINT     DD  SYSOUT=*    
//SYSIN        DD  *     
-OPT GPO,SKIPERR         
-SEL NAME=,EXEC,ARC=-1   
-END                    
/*                       
//ARC1STP2     EXEC PGM=AFOLIBR,PARM='NJTA,NRJS'  
//STEPLIB      DD  DSN=your.LIBR.CALJLINK,DISP=SHR
//OSJOB        DD  DSN=your.LIBRARC.MINUS1.PDS,DISP=(,CATLG),
//             UNIT=3390,SPACE=(CYL,(pp,ss,dd)),VOL=SER=vvvvvv, 
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000) 
//SYSPRINT     DD  SYSOUT=*    
//MASTER       DD  DSN=your.LIBR.PRODMAST,DISP=SHR
//SYSIN        DD  DSN=your.LIBR.OSJOB,DISP=SHR
//*                     
//DEL3    EXEC  PGM=IDCAMS   
//SYSPRINT  DD  SYSOUT=A   
//SYSIN     DD  *       
DELETE your.LIBR.OSJOB
/*               
//*             
//ARC2STP1     EXEC PGM=AFOLIBR,PARM='NJTA,NRJS'     
//OSJOB        DD  DSN=your.LIBR.OSJOB,DISP=(,CATLG),
//             UNIT=3390,SPACE=(CYL,(pp,ss)),VOL=SER=vvvvv,    
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)          
//LIST         DD  SYSOUT=*  
//MASTER       DD  DSN=your.LIBR.PRODMAST,DISP=SHR      
//SYSPRINT     DD  SYSOUT=*  
//SYSIN        DD  *  
-OPT GPO,SKIPERR     
-SEL NAME=,EXEC,ARC=-2 
-END             
/*               
//ARC2STP2     EXEC PGM=AFOLIBR,PARM='NJTA,NRJS'             
//STEPLIB      DD  DSN=your.LIBR.CALJLINK,DISP=SHR      
//OSJOB        DD  DSN=your.LIBRARC.MINUS2.PDS,DISP=(,CATLG),
//             UNIT=3390,SPACE=(CYL,(pp,ss,dd)),VOL=SER=vvvvvv,  
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)          
//SYSPRINT     DD  SYSOUT=*   
//MASTER       DD  DSN=your.LIBR.PRODMAST,DISP=SHR      
//SYSIN        DD  DSN=your.LIBR.OSJOB,DISP=SHR          
//*                         
//