IBM Support

How to delete PDSE data set that still has open connections

Question & Answer


Question

The following error messages can be received when a PDSE data set is deleted. What steps can be performed to successfully delete the data set? IEC614I SCRATCH FAILED - RC 008, DIAGNOSTIC INFORMATION IS (043D57D4), volser,dsname OR IEC331I 042-006(043D57D4),jjj,sss,SCRT,IGG0CLH0 IEC331I VOL,ser,NAME,dsname

Cause

These messages indicate that the PDSE data set is in use on another system in the SYSPLEX.  A connection to a PDSE directory is established when a program opens a PDSE data set. The connection is dropped when the program closes the data set.  A PDSE data set cannot be deleted while there are active connections to its directory.

Answer

The following manuals can be referenced to find the explanation of the errors.

For the IEC331I: 

Title: z/OS V1R13.0 MVS System Messages, Vol 7 (IEB-IEE)
Document Number: SA22-7637-24

IEC331I 042-006(043D57D4),jjj, sss,proc[func],mmm VOL,ser,NAME,dsname

IEC331I 042-006(043D57D3),jjj, sss,proc[func],mmm VOL,ser,NAME,dsname


Explanation: An error condition was detected processing a catalog management request directed to either a VSAM or an ICF catalog. See message IDC3009I for an explanation of the return and reason codes.

Title: z/OS V1R12.0 MVS System Messages, Vol 6 (GOS-IEA)
Document Number: SA22-7636-21

For the IEC614I: 


Title: z/OS V1R13.0 MVS System Messages, Vol 7 (IEB-IEE)
Document Number: SA22-7637-24


IEC614ISCRATCH FAILED - RC 008, DIAGNOSTIC INFORMATION IS (043D57D4), sss,ser, dsname 

IEC614ISCRATCH FAILED - RC 008, DIAGNOSTIC INFORMATION IS (043D57D3), sss,ser, dsname 


Application Programmer Response: If the job step failed, refer to the z/OS DFSMSdfp Diagnosis for an explanation of the failing function's return code, and of the associated diagnostic information


Title: z/OS V1R12.0 DFSMSdfp Diagnosis
Document Number: GY27-7618-13
 
 Table 61. DADSM SCRATCH Diagnostic Information (Register 0)                                      
 Byte 0     
 Byte 1     
 Byte 2     
 Byte 3     
                                           
                                           
                                           
                                           

Description                               
           
DADSM     
Error Code 
             
Subfunction 
Identifier 
             
Subfunction 
Return Code 
 Subfunction
Reason     
Code   
X'04'      
           
           
           
           
           
 X'3D'      
           
           
           
           
           
 CDMRSN1    
           
           
           
           
           
 CDMRSN2    
           
           
           
           
           
 Invoke CDM to delete a PDSE directory;    
directory could not be deleted. Use the two rightmost bytes for the CDM reason codes. For explanation, see
"CDM reasocodes" in topic 15.4.4.                    


15.4.4 CDM reason codes
 
 X'01xx57D3'      
                 
 Unable to delete the data set because it is connected on this system.                                                                  
 X'01xx57D4'      
                 
 Unable to delete the data set because it is connected on some other system in the Parallel Sysplex®.                                  
Note the CDM rsncode 57D3 or 57D4 to determine whether the PDSE data set is in use on the current system or another system in the SYSPLEX.  

A connection to a PDSE directory is established when a program opens a PDSE data set.

The connection is dropped when the program closes the data set.

A PDSE data set cannot be deleted while there are active connections to its directory.

There are several courses of action.


  • 1. Wait for all of the LPARs in the SYSPLEX to be IPL'd. The IPL's release all PDSE data set control blocks.

    2. If the data set is not linklisted, a restart of the SMSPDSE1 address space on all LPARs, cleans up the PDSE-related control blocks.

    3. Zap off the PDSE bit in the format-1 DSCB for the data set.

    Step-by-step instructions for method #3.

    1. Run an IEHLIST LISTVTOC against the VTOC the volume where the PDSE resides.

    2. Obtain the CCHHR address of the FORMAT-1 DSCB for the PDSE you are trying to delete.

    3. Identify and close existing data set connections for non-LINKLISTed PDSE data sets.
    • Issue the following console command to the display PDSE data set connections. Route this command to all LPARs in the SYSPLEX.

      ROUTE *ALL,D SMS,PDSE<1>,CONNECTIONS,DSN(pdsename)<,VOL(volser)>

      Sample command output:
      D SMS,PDSE,CONNECTIONS,DSN(DMONE.PDSE.TEST)
      IGW051I PDSE CONNECTIONS Start of Report(SMSPDSE)
      ----------data set name---------------------- -----vsgt-------
      DMONE.PDSE.TEST                              01-PDM001-000730
      --asid-- --name-- --tcb--- -open-
        0035   USER3    009FF070 Input
      PDSE CONNECTIONS End of Report(SMSPDSE)
    • Take the necessary actions, on all LPARs in the SYSPLEX, to end the jobs, TSO users or started tasks that show connections to the PDSE data set.
    • Delete the data set after all connections are closed by using a TSO DELETE command or a batch IDCAMS job.
      Note: Deleting the data set from an ISPF panel, such as Option 3.4 (ISRUDLP), establishes a new connection
      and this new connection blocks the delete.
    • If the IGW051I PDSE CONNECTIONS report shows INIT as the name of the JOB that has the PDSE connected, then it might be necessary to stop and restart the initiator to release the data set connection.

    For example,

    IGW051I PDSE CONNECTIONS Start of Report(SMSPDSE)        
    ---------data set name---------------------- -----vsgt-------    
                 dsname                          01-volser-ttttrr  

    --asid-- --name-- --tcb--- -open-                  
      asid     INIT   tcbaddr   Input                    

    PDSE CONNECTIONS End of Report(SMSPDSE)            

    4. ZAP off "08" bit (DS1PDSE) in the DS1SMSFG flag (offset x'4E') within the FORMAT-1 DSCB.

    The IEHLIST FORMAT report displays this flag as the letter "I" in the SMS.IND.
    •  Delete the data set after zapping the flag bit off.
    •  Allocate a physical sequential (DSORG=PS) data set after the PDSE data set is deleted.

    Note: Internally, a PDSE data set is identified by a control block known as a VSGT (Virtual Storage Group Token).  The VSGT is made up of two unique fields, the volser where the PDSE resides and the TTR address of the format-1 DSCB for the data set.  The reason for allocating a new non-PDSE data set is that we want the discarded DSCB to be reused immediately by a data set other than a PDSE.  A PDSE's uniqueness is based in part, by its DSCB's location in a VTOC.

      • Sample IEHLIST JCL:
        ----------
        //STEP01    EXEC PGM=IEHLIST
        //SYSPRINT  DD SYSOUT=*
        //DD1       DD UNIT=3390,VOL=SER=CT1TP8,DISP=SHR
        //SYSIN    DD *
          LISTVTOC DUMP,VOL=3390=volser,DSNAME=(PDSE DSN)
          LISTVTOC FORMAT,VOL=3390=volser,DSNAME=(PDSE DSN)
        /*


        Sample ZAP JCL:
        --------
        //ZAPVTOC   EXEC PGM=AMASPZAP
        //SYSPRINT  DD  SYSOUT=*
        //SYSLIB    DD  UNIT=SYSDA,VOL=SER=volser,
        //        DSNAME=FORMAT4.DSCB,DISP=OLD
        //SYSIN   DD *
           CCHHR cccchhhhrr
           VER 004E x8
           REP 004E x0

Note : the IEHLIST provides the address of the format1-DSCB in decimal cchhr format. The AMASPZAP requires the ccchhhhrr to be in hex format.  For example, decimal a cchhr of 01 04 32 would be hex 0001000420.

At z/OS 1.13 and higher releases, a console command can be used to display PDSE data set connections.

D SMS,PDSE<1>,CONNECTIONS,DSN(pdsename)<,VOL(volser)>

Here is a sample output from the display.

D SMS,PDSE,CONNECTIONS,DSN(DMONE.PDSE.TEST)            
IGW051I PDSE CONNECTIONS Start of Report(SMSPDSE)    
---------data set name---------------------- -----vsgt-------            
DMONE.PDSE.TEST                              01-PDM001-000730            
--asid-- --name-- --tcb--- -open-                                        
  0035   USER3    009FF070 Input                                          
PDSE CONNECTIONS End of Report(SMSPDSE)                          

If needed, either of the following slips can be set to capture a dump at the time of the scratch error, which can show the open connections to the PDSE.

SL SET,MSGID=IEC331I,J=jobname,A=SVCD,
SD=(ALLNUC,ALLPSA,LPA,LSQA,SQA,CSA,RGN,TRT,SUMDUMP,GRSQ),
JOBLIST=(*MASTER*,SMSPDSE),END

SL SET,MSGID=IEC614I,J=jobname,A=SVCD,
SD=(ALLNUC,ALLPSA,LPA,LSQA,SQA,CSA,RGN,TRT,SUMDUMP,GRSQ),
JOBLIST=(*MASTER*,SMSPDSE),END

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG90","label":"z\/OS"},"Component":"5695DF115 - DFSMS\/MVS PDSE AND FAMS","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"2.10;2.2, 2.3","Edition":"","Line of Business":{"code":"LOB56","label":"Z HW"}}]

Document Information

Modified date:
03 September 2021

UID

isg3T1012811