We've just benchmarked using FMGR/IMS to delete specific (i.e. by key) segments in prep for a large run (33M segments)
150,000 segs 316 segs/sec 7.9 min cpu 33 Megs Region
250,000 segs 228 segs/sec 14.5 min cpu 98 Megs Region
1,000,000 segs 75 segs/sec 223.6 min cpu 274 Megs Region
Using this Rexx code:
$$FILEM IEB REGNTYPE=DLI,
$$FILEM PSBTYPE=STATIC,
$$FILEM PSBDSN=DCAP.TESTONCE.PSBLIB,
$$FILEM PSBMEM=DPOLUPDT,
$$FILEM PCBNAME=LPOLICY,
$$FILEM DBDDSN=DBA2.RP.DBDLIB,
$$FILEM DBDMEM=D1POLICY,
$$FILEM RESLIB1=IMS.TST1.RESLIB,
$$FILEM RESLIB2=IMS.TST1.DFSMDA,
$$FILEM MACLIB=IMS.TST1.SDFSMAC,
$$FILEM DBRC=N,
$$FILEM IMSOBA=6,
$$FILEM IMSNBA=10,
$$FILEM CHKPFREQ=10000,
$$FILEM DFSVSAMP=DBA2.RP.DBVSAMP,
$$FILEM VSMPMEM=AEAP,
$$FILEM PROC=*
REXX procedure statements processed by REXX.
/*---------------------------------------------------------------*/
/* AR51932 delete zpohist/zpocohi based on input file */
/* for policy num/licence series/hist expiry date */
/* these parameters used in job FMGRT1OD */
/* DBVSAMP changed to AEAP based on DBA advice */
/*---------------------------------------------------------------*/
filerc = VIEWIMS('TPLDSN=DBA2.RP.TEMPLATE')
inrc = 0
do while inrc = 0
ADDRESS MVS "EXECIO 50000 DISKR IXPIN (STEM ENTRY."
inrc = rc
say entry.0 'records read'
DO I = 1 TO ENTRY.0
polynum = SUBSTR(ENTRY.I,1,7)
histexpdate = SUBSTR(ENTRY.I,8,5)
fmrc = DELIMS(' SEGMENT=ZPOHISTP FIRST ',
'WHERE SEGMENT=ZPOBASEP',
'#POLYNUM='polynum,
' SEGMENT=ZPOHISTP',
'#HISTORY_EXP_DATE='histexpdate)
if fmrc > 0 then
Say 'ZPOHISTD SEGMENT NOT DELETED 'polynum fmrc histexpdate
END
END
Any suggestions, anyone? Given the four hour window we have access to the database, this approach just isn't practical, no matter how we split it up.