How to add all members from a PDS to a master file?

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

Description:

Need to add all members of a PDS to a master file specifying language, description, and history for the members.

Solution:

Assembler and Link User Contributed Routine LIBRADD. SAMPLEJCL to Assembly and Link the LIBRADD module found in the installation dataset called CLJ43UCR(INSTUCR). After the LIBRADD module is in the cailib then execute the SAMPLJCL to populate the master file from the PDS.

 //LIBRADDP   EXEC  PGM=AFOLIBR,PARM='IEX=LIBRADD'             
 //STEPLIB     DD   DSN=LIBSYS.LRSMP.GL430609.CAILIB,DISP=SHR   
 //SYSPRINT   DD    SYSOUT=*                                   
 //INDEX        DD    SYSOUT=*                                   
 //LIST           DD    SYSOUT=*                                   
 //OSJOB        DD    DUMMY                                      
 //MASTER      DD    DISP=SHR,DSN=your.master.file 
 //PDS            DD    DISP=SHR,DSN=your.pds.file              
 //SYSIN         DD    *                                          
 -OPT LIST                                                       
 -LANG DAT                                                       
 -DESC ACCOUNTING SYSTEM                                                    
 -HST TRANFER FROM PDS 3/05/08                              
 -END                                                            
 /*                                                              
 //