Jack, I just ran your control cards against my dcollect extract and I know the reason for overflow. Your INREC is initializing the space values that you are summing with zeros IF that Record( D, B, M) is FOUND. So, if you don't have any one of the record, you will be summing the spaces/garbage and it will exceed the 8 byte value. So, you just need to change the INREC to the following. I just moved the initialization of the space values to WHEN=INIT.
INREC IFTHEN=(WHEN=INIT, PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)), OVERLAY=(FMT-HLQ:%01, TMP-DCDALLSP:8Z, TMP-UMALLSP:8Z, TMP-UBALLSP:8Z)), IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT), OVERLAY=(TMP-DCDALLSP2:DCDALLSP)), * ALLOC SPACE IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR), OVERLAY=(TMP-UMALLSP2:UMALLSP)), * MIGRATED SPACE IFTHEN=(WHEN=NONE, OVERLAY=(TMP-UBALLSP2:UBALLSP)) * BACKUP SPACE Thanks, Kolusu DFSORT Development IBM Corporation -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Sri h Kolusu Sent: Wednesday, September 6, 2023 10:13 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [EXTERNAL] Re: Help on DFSORT SUM FIELDS >> I am doing something wrong because I am getting one output record for each >> input record, instead of the few hundreds I was expecting to get. Jack, If I had to take an educated guess, you are getting an overflow error. Look for ICE152I message in the sysout. I guess you earlier had a similar issue. https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg124452.html Thanks, Kolusu DFSORT Development IBM Corporation ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu<mailto:lists...@listserv.ua.edu> with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN