Need JCL to copy a Librarian Master file member to a PDS.
search cancel

Need JCL to copy a Librarian Master file member to a PDS.

book

Article ID: 276268

calendar_today

Updated On:

Products

Librarian

Issue/Introduction

A programmer needs to copy a member from a Librarian Master file to a PDS in batch.   

Environment

Librarian v4.4

Resolution

Use the Utility -EXTRACT command:

//LIBREXT  EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'      
//SYSPRINT DD  SYSOUT=*            
//MASTER   DD  DISP=SHR,DSN=hlq.Librarian.Master.file     
//OSJOB    DD  DSN=hlq.PDS(member),    
//         DISP=SHR                    
//SYSIN    DD  *                  
-OPT UTILITY                        
-EXTRACT member                 
-END                                      
/*                                    
 
 
If the Master file is MCD secured, be sure to include the -MCD statement with the appropriate MCD code:
//SYSIN    DD  *                   
-OPT UTILITY
-MCD xxxx                    
-EXTRACT member                 
-END                                      
/*   
 
 
By default, the EXTRACT command expands any -INC includes in the member.  If the includes are not to be expanded, use the NOINC option to prevent the expansion of -INC statements in the extracted members.
 
//SYSIN    DD  *                   
-OPT UTILITY             
-EXTRACT member,NOINC                 
-END                                      
/*