Previous Topic: RestrictionsNext Topic: Enhanced Data Set Integrity Facility


AUTOFREE Feature

The ECMF AUTOFREE feature can be used to dynamically deallocate a data set that was dynamically allocated to a TSO user, but is currently marked Not-in-Use. Data sets that are marked Not-in-Use can cause local or global ENQ conflicts for the SYSDSN QNAME. For example, if a TSO user issues a compile command, object and load files are allocated dynamically. These files are marked Not-in-Use after the compile completes, but the files are still allocated to the TSO user. Non-temporary data sets that are allocated through SVC 99 in a TSO task and are still allocated at task termination (normal/abnormal) are marked Not‑in‑Use through SVC 99 Verb Code 5.

To determine which data sets are currently marked Not-in-Use, issue the following TSO command:

LISTA ST SY H

The following information displays:

--DSORG--CREATED-----EXPIRES-----SECURITY--DDNAME---DISP--
SYS1.LINKLIB                                              
  PO     06/25/1998  00/00/0000  NONE      RES      KEEP
SYS00066.T143549.RA000.USER001.R0128686                          
  PS     03/06/2000  00/00/0000  NONE      ISPCTL0  DELETE,DELETE
SYS1.LINKLIB                                                     
  PO     06/25/1998  00/00/0000  NONE      SYSLMOD  KEEP         
*USER001.SDSITEST.OBJ                                            
  PS     03/06/2000  00/00/0000  NONE      SYS00045 KEEP,KEEP    
*USER001.SDSITEST.LINKLIST                                       
  PS     03/06/2000  00/00/0000  NONE      SYS00047 CATLG,CATLG  
*USER001.SDSITEST.LOAD(TEMPNAME)                                 
  PO     03/06/2000  00/00/0000  NONE      SYS00049 CATLG,CATLG

The data sets marked with an * character are currently marked Not‑in‑Use, and are eligible for AUTOFREE.

Note: GDG and temporary data sets are not eligible to be automatically freed by this feature of ECMF.

If a batch job is submitted that needs one of these files, the job cannot allocate these files until the TSO user deallocates them or ends the TSO session.

When the AUTOFREE feature is active, ECMF checks to see whether a data set is marked Not-in-Use when the conflict occurs. ECMF checks the DSABNUSE bit in the DSAB, if this bit is not on, then the data set is considered Not-in-Use. If the bit is not on, then ECMF automatically frees the resource through SVC 99, the TSO user is notified with the MIM1043 messages, and the operator is notified with MIM1038, MIM1039, and MIM1040 messages. By doing this, ECMF enables the task that needs the data set to continue.

When the conflict is first detected, the following messages are sent to the operator:

MIM1038 USER001D CONTENTION WITH USER001 OWNS SHR  ON XE44
MIM1039 USER001D NEEDS EXCL SYSDSN   USER001.SDSITEST.OBJ 
MIM1039 USER001D NEEDS EXCL SYSDSN   USER001.SDSITEST.LINKLIST
MIM1039 USER001D NEEDS EXCL SYSDSN   USER001.SDSITEST.LOAD
MIM1040 USER001D WAITING FOR RESOURCES

When the resource is freed, the following messages are sent to the TSO user:

MIM1043 SYSDSN   USER001.SDSITEST.LOAD FREED FOR USER001D ON XE44
MIM1043 SYSDSN   USER001.SDSITEST.LINKLIST FREED FOR USER001D ON XE44
MIM1043 SYSDSN   USER001.SDSITEST.OBJ FREED FOR USER001D ON XE44