How to copy all members from MASTER file to PO file with READONLY authority.

Document ID : KB000015387
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

Generally, when copying all members from Master file to PO file, use the -OPT GPO and -SEL commands.

However, the -SEL command accesses a Master file with UPDATE mode.

If you do not have the UPDATE authority, a security violation occurs.

Question:

Is there a good method to copy all members from MASTER file to PO file with READONLY authority.

Environment:
z/OSLibrarian R4.4
Answer:

The -EXTRACT is a READONLY access command for input Master file.
However, if you copy many members, you have to execute many steps because it is a command to copy a single member.
If you can create a temporary Master file, the following sample JCL is effective. And, you can copy all member.

 

Sample JCL;

//         JOB                                                         
//*                                                                    
//STEP01  EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                            
//STEPLIB  DD  DISP=SHR,DSN=LIBR.R44SP00.CALJLINK                      
//SYSPRINT DD  SYSOUT=*                                                
//MASTER   DD  DSN=&&MASTER,DISP=(,PASS),UNIT=SYSDA,                   
//             SPACE=(CYL,(5)),DCB=(BLKSIZE=7548,DSORG=DA)             
//OSJOB    DD  DUMMY                                                   
//SYSIN    DD  *                                                       
-OPT INIT,DISK,SEQ=/81,6,10,10/,COMPRESS=FULL,ARC=5                    
-END                                                                   
/*                                                                     
//*                                                                    
//STEP02  EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                            
//STEPLIB  DD  DISP=SHR,DSN=LIBR.R44SP00.CALJLINK                      
//SYSPRINT DD  SYSOUT=*                                                
//MASTER   DD  DSN=LIBR.INPUT.READMAST,DISP=SHR                        
//OSJOB    DD  DSN=&&OSJOB1,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(5,1))  
//SYSIN    DD  *                                                       
-OPT GPO                                                               
-OPT UTILITY                                                           
-COPY NAME=,NOREP                                                      
-END                                                                   
/*                                                                     
//*                                                                    
//STEP03  EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                            
//STEPLIB  DD  DISP=SHR,DSN=LIBR.R44SP00.CALJLINK                      
//SYSPRINT DD  SYSOUT=*                                                
//MASTER   DD  DSN=LIBR.INPUT.READMAST,DISP=SHR                        
//OSJOB    DD  DSN=&&OSJOB2,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(5,1))  
//SYSIN    DD  DSN=&&OSJOB1,DISP=(OLD,DELETE)                          
//*                                                                    
//STEP04   EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                           
//STEPLIB  DD  DISP=SHR,DSN=LIBR.R44SP00.CALJLINK                      
//SYSPRINT DD  SYSOUT=*                                                
//MASTER   DD  DSN=&&MASTER,DISP=(OLD,PASS)                            
//OSJOB    DD  DUMMY                                                   
//SYSIN    DD  DSN=&&OSJOB2,DISP=(OLD,DELETE)                          
//*                                                                    
//STEP05  EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                            
//STEPLIB  DD  DISP=SHR,DSN=LIBR.R44SP00.CALJLINK                      
//SYSPRINT DD  SYSOUT=*                                                
//MASTER   DD  DSN=&&MASTER,DISP=(OLD,PASS)                            
//OSJOB    DD  DSN=&&OSJOB3,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(5,1))  
//SYSIN    DD  *                                                       
-OPT GPO                                                               
-SEL NAME=,EXEC                                                        
-END                                                                   
/*                                                                     
//*                                                                    
//STEP06  EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                            
//STEPLIB  DD  DISP=SHR,DSN=LIBR.R44SP00.CALJLINK                      
//MASTER   DD  DSN=&&MASTER,DISP=(OLD,DELETE)                          
//INDEX    DD  SYSOUT=*                                                
//SYSPRINT DD  SYSOUT=*                                                
//OSJOB    DD  DSN=PUBLIC.LIBR.POFILE,UNIT=SYSDA,VOL=SER=WORK01,       
//         SPACE=(CYL,(5,1,5)),DISP=(,CATLG,DELETE),                   
//         DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=3120)               
//SYSIN    DD  DSN=&&OSJOB3,DISP=(OLD,DELETE)                          
//