How do I delete all members off a master file?
search cancel

How do I delete all members off a master file?

book

Article ID: 54990

calendar_today

Updated On:

Products

Librarian

Issue/Introduction

Description:

Need to delete all members off a master file in batch.

 

Environment

Release: LIB-AM00200-4.3-CA-Librarian-Access Method
Component:

Resolution

Solution:

Using the JCL below this will delete all the members off the master file:

//STEP1         EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                   
//SYSPRINT     DD SYSOUT=*                                          
//MASTER       DD DSN=your.master.file,DISP=SHR                     
//OSJOB         DD DSN=&&TEMP,DISP=(,PASS),UNIT=SYSDA,               
//        SPACE=(TRK,(3,1)),DCB=(RECFM=FB,BLKSIZE=3120)             
//SYSIN          DD *                                           
-OPT GPO                                                            
-DLM NAME=,EXEC(R)                                                  
-END                                                                
/*                                                                  
//STEP2         EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'                   
//MASTER       DD  DSN=your.master.file,DISP=SHR                    
//OSJOB         DD    DUMMY                                          
//SYSPRINT    DD       SYSOUT=*                                    
//LIST            DD       SYSOUT=*                                    
//SYSIN          DD       DSN=&&TEMP,DISP=(OLD,DELETE)