How to delete expired datasets using the SYSVIEW Event Capture CAPMAINT process
Release: FAQSO.00200-14.1-SYSVIEW-Performance Management
The ideal solution would be to use SMS constructs for managing the retention for the capture datasets by coding AllocDataClass, AllocStorClass, and AllocMgmtClass in the CAPTURE parmlib member so the retention coded for AllocRetention would not be in conflict with SMS.
Should you not want to use the SMS constructs to manage the capture datasets, you can have the CAPMAINT capture do the HDELETES. Using the supplied sample Rexx Exec, the following steps will be required:
Here is the sample exec:
..... /* REXX =============================================================* /* * /* CA SYSVIEW * /* * /*===================================================================* /* * /* Description * /* * /* This REXX exec can be called using XTSO from the CAPMAINT * /* CAPLIB member to do an HDELETE of any MIGRAT'ed capture * /* datasets. * /* * /*===================================================================* ADDRESS 'LINK' 'GSVXRXAA' ADDRESS 'SYSVIEWE' "C(CAPMAINT;SELECT CAPVOL = MIGR= AND IDXSTAT = EXPIRED) STACK(NO)" "C(XVEXTRAC DATA CapDsname CapDsname.)" ADDRESS 'TSO' IF CapDsname.0 > 0 THEN DO i = 1 to CapDsname.0 cmd = "HDELETE '"CapDsname.i"'" say cmd cmd say END ELSE say 'No migrated capture datasets to delete' ADDRESS 'SYSVIEWE' "C(END)" EXIT .....