How to automate cleanup of user Home Directory when user id is no longer valid within ACF2.
Release : 16.0
Component : CA ACF2 for z/OS
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 *
/* 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),
//BACKOUT DD DSN=CLEANUP.CMDS.BOUT,UNIT=SYSDA,DISP=(,CATLG,DELETE),
//SYSIN DD *
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