Uncatalog Datasets


  • Uncatalog removes the dataset entry from the catalog table. So that if you search for the dataset from the Data Set List Utility (=3.4) by providing the dataset's name, you will not be able to find the dataset.
  • Uncatalog performs on cataloged data sets to hide them from the search.
  • To access the dataset, you should also provide the Volume Serial number where the dataset resides upon.
  • IEFBR14 can be used to uncatalog the sequential file (PS) or partitioned dataset (PDS).
  • The disposition to uncatalog the dataset is DISP=(OLD,UNCATLG,..).

UNCATLG option performs below two tasks -

  • Removes the entry in the system or user catalog directory for the dataset.
  • Removes all the related indexes that exists to access the dataset.

Syntax -


//Job-Card
//*
//STEP1    EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSDUMP  DD SYSOUT=* 
//DD1      DD DSN=datset.name, DISP=(OLD,UNCATLG,..)

Example -


Scenario - Uncatalog the PS and PDS using IEFBR14 utility.

Input PS File - MATEPK.IEFBR14.PSFILE
Input PDS File - MATEPK.IEFBR14.PDSFILE

JCL -

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MATEPKU  JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),           
//             NOTIFY=&SYSUID                                           
//******************************************************************    
//* UNCATALOG DATA SET USING IEFBR14 UTILITY                            
//*****************************************************************     
//STEP01   EXEC PGM=IEFBR14                                             
//DD1      DD DSN=MATEPK.IEFBR14.PSFILE,                                
//            DISP=(OLD,UNCATLG,DELETE)                                 
//DD2      DD DSN=MATEPK.IEFBR14.PDSFILE,                               
//            DISP=(OLD,UNCATLG,DELETE)                                 
**************************** Bottom of Data ****************************

Output -

Go to Spool (SDSF -> ST) and verify the status in the JESYSMSG DDname of the corresponding job.

********************************* TOP OF DATA **********************************
ICH70001I MATEPK   LAST ACCESS AT 11:16:11 ON SATURDAY, AUGUST 20, 2022         
IEF236I ALLOC. FOR MATEPKU STEP01                                               
IEF237I 0ABB ALLOCATED TO DD1                                                   
IEF237I 0ABB ALLOCATED TO DD2                                                   
IEF142I MATEPKU STEP01 - STEP WAS EXECUTED - COND CODE 0000                     
IEF285I   MATEPK.IEFBR14.PSFILE                        UNCATALOGED              
IEF285I   VOL SER NOS= DEVHD4.                                                  
IEF285I   MATEPK.IEFBR14.PDSFILE                       UNCATALOGED              
IEF285I   VOL SER NOS= DEVHD4.                                                  
IEF373I STEP/STEP01  /START 2022232.1119                                        
IEF032I STEP/STEP01  /STOP  2022232.1119                                        
        CPU:     0 HR  00 MIN  00.01 SEC    SRB:     0 HR  00 MIN  00.00 SEC    
        VIRT:     4K  SYS:   228K  EXT:        0K  SYS:    13476K               
IEF375I  JOB/MATEPKU /START 2022232.1119                                        
IEF033I  JOB/MATEPKU /STOP  2022232.1119                                        
        CPU:     0 HR  00 MIN  00.01 SEC    SRB:     0 HR  00 MIN  00.00 SEC    
******************************** BOTTOM OF DATA ********************************

Explaining Example -

  • DD1 DD * - Specifies PS dataset with DISP for uncatalog (DISP=(OLD,UNCATLG,DELETE)).
  • DD2 DD * - Specifies PDS dataset with DISP for uncatalog (DISP=(OLD,UNCATLG,DELETE)).
  • MATEPKU STEP01 - STEP WAS EXECUTED - COND CODE 0000 - Specifies the STEP01 completed successfully.
  • MATEPK.IEFBR14.PSFILE  UNCATALOGED - Specifies the MATEPK.IEFBR14.PSFILE uncataloged successfully.
  • MATEPK.IEFBR14.PDSFILE  UNCATALOGED - Specifies the MATEPK.IEFBR14.PDSFILE uncataloged successfully.