Page 1 of 1

File Manager/IMS - Poor Performance

PostPosted: Sat Jul 23, 2011 2:04 am
by gmosley
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.

Re: File Manager/IMS - Poor Performance

PostPosted: Sat Jul 23, 2011 2:57 am
by dick scherrer
Hello,

Definitely not a good use of rexx. . . .

Suggest you consider unloading the data, deleting the 33m discards, and reload.

There is seldom an acceptable reason to do this sort of thing on many individual entries - this should be a batch/wholesale run using utilities, not rexx. Often a bad approach is considered so it is easier on the programmer/analyst . . . :(

I believe this will run well within your window if the method is changed (depending on the size/speed of your system and the resources made available to the process). As you have seen, it is unlikely that this will succeed using the current approach.