Cleaning the Home Directory when the ACF2 user id is no longer valid
search cancel

Cleaning the Home Directory when the ACF2 user id is no longer valid

book

Article ID: 218143

calendar_today

Updated On:

Products

ACF2 - z/OS

Issue/Introduction

How to automate cleanup of user Home Directory when user id is no longer valid within ACF2.

Environment

Release : 16.0

Component : CA ACF2 for z/OS

Resolution

There is no ACF2 utility available that automates cleaning up of user Home directory when user id is no longer valid. 

The following steps can be taken with some manual processing to cleanup the Home directory of user ids no longer valid in ACF2:

1. Run Cleanup JCL for user ids with UNREF parameter using the the sample JCL shown below

//AT5RPT   EXEC  PGM=AT5#RPT,REGION=4M,PARM='UNREF=30'                  
//STEPLIB   DD DISP=SHR,DSN=CLEANUP.R121.CDMELINK                
//DBASE      DD  DISP=SHR,DSN=CLEANUP.R121.DB  --> Tracking database file                    
//*                                                                     
//SYSPRINT   DD  SYSOUT=*                                               
//SYSOUT     DD  DUMMY                                                  
//SORTWK01   DD  UNIT=3390,SPACE=(CYL,15)                               
//SORTWK02   DD  UNIT=3390,SPACE=(CYL,15)                               
//*                                                                     
//INCLUDE    DD  *                                                      
LOGONID                                                                                                                  
/* CLASS(USER) NAME(Z) ALL LOGONIDS THAT START WITH Z                   
//CMDS       DD  SYSOUT=*                                               
//BACKOUT    DD  SYSOUT=*                                               
//CMDS DD DSN=CLEANUP.CMDS.OUT,UNIT=SYSDA,DISP=(,CATLG,DELETE),    
//  SPACE=(CYL,(1)),DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)                  
//BACKOUT DD DSN=CLEANUP.CMDS.BOUT,UNIT=SYSDA,DISP=(,CATLG,DELETE),
//  SPACE=(CYL,(1)),DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)                  
//SYSIN  DD  *                                                          
OPTION(COMMENTACCESSNONE)                                               
/*

This will create DD definitions for backout flat files that contains the commands to delete and rebuild the user profile records

2. Write a REXX or a batch program to read and parse this flat file to pick the delete commands for home directory only

3. Run OMVS BPXBATCH to delete the home directory of all unwanted user ids