Mike Schwab on IBM Mainframe Discussion List <[email protected]> wrote on 03/29/2011 10:25:11 AM: > You can use DFSORT SUM FIELDS to consolidate records. When adding two > records together would overlow any output field, it will not > consolidate those records and you end up with multiple records for the > same key. You might be able to extend the fields with x'00' fillers > in front, depending on how large a binary field it will allow. Or > convert them to PD or ZD fields which allow 15 digits.
DFSORT supports 8-byte binary values for SUM, so you could use INREC to extend the 4-byte binary values with 4 binary zeros on the left before SUMming to prevent overflow. Alternatively, you could use OUTFIL's SECTIONS with TRAILER3 and TOTAL. That way, you could add the 4-byte BI fields and get a larger BI, ZD or PD total without worrying about overflow. Frank Yaeger - DFSORT Development Team (IBM) - [email protected] Specialties: FINDREP, WHEN=GROUP, DATASORT, ICETOOL, Symbols, Migration => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

