The ideal solution would be to use SMS constructs for managing the retention for the capture datasets by codeing 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:
- Copy the attached CAPMAINT sample exec into the SYSVIEW REXXLIB (CNM4BREX)
- Update the CAPMAINT member in CAPLIB (CNM4BCAP) so that it calls the CAPMAINT exec by making the following updates:
CAPPARMS DESCR c'Capture index maintenance'
XTSO CAPMAINT /* <--- Added this line */
CAPTURE /* <--- Added this line */
. . . .
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'
"C(CAPMAINT;SELECT CAPVOL = MIGR= AND IDXSTAT = EXPIRED) STACK(NO)"
"C(XVEXTRAC DATA CapDsname CapDsname.)"
IF CapDsname.0 > 0 THEN
DO i = 1 to CapDsname.0
cmd = "HDELETE '"CapDsname.i"'"
say 'No migrated capture datasets to delete'