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

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

book

Article ID: 15387

calendar_today

Updated On:

Products

Librarian

Issue/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.



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

Environment

z/OSLibrarian R4.4

Resolution

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)                          
//