How do I copy all the members to a PDS from master file not expanding the includes?

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

Description:

Need to copy all the members of a Librarian Master File to a PDS and do not want includes or copybooks being expanded. Every time a -INC is encountered it expands it.

Solution:

The problem is that -OPT GPO does not support -NOINC to prevent the includes from being expanded. Need to edit the -INC to something else like =INC and then perform the copy. Here is an example below:

//LIBR     EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                         
 //MASTER   DD DISP=SHR,DSN=your.master.file                       
 //OSJOB    DD DSN=&&OSJOB1,DISP=(,PASS),                             
 //            UNIT=SYSDA,                                            
 //            SPACE=(CYL,(5,2),RLSE),                                
 //            DCB=(LRECL=80,RECFM=FB,DSORG=PS,BLKSIZE=6080)          
 //SYSPRINT DD SYSOUT=*,DCB=RECFM=FBA                                 
 //SYSIN DD *                                                         
 -OPT GPO                                                             
 -SEL NAME=,EXEC(R),TEMP,COPYDDOFF,CCOPYOFF                           
 -EDIT /-INC/=INC/                                                    
 -END                                                                 
 //*                                                                  
 //*    THIS STEP UNLOADS ALL MEMBERS IN SYSIN FILE FROM LIBRARIAN TO 
 //*    A PDS (DDNAME=OSJOB)                                          
 //*                                                                  
 //UNLOAD   EXEC PGM=AFOLIBR,PARM='NRJS,NJTA',REGION=0M               
 //LIST     DD DUMMY                                                  
 //MASTER   DD DISP=SHR,DSN=your.master.file                       
 //OSJOB  DD DSN=your.pds.file,DISP=SHR                            
 //SYSPRINT DD SYSOUT=*,DCB=RECFM=FBA                                 
 //SYSIN    DD DSN=&&OSJOB1,DISP=(OLD,PASS)                           
 /*