The Smart DFSORT Tricks doesn't have anything especially close. Search-engineing *will* provide something very close. But, as the obvious post itself suggests, understanding the code allows the same or similar techniques to be known and therefore available for other circumstances.
Gives me a chance to check if I missed something :-) Well, there's that BUILD in the OUTFIL. The point of that, and it may be needed here, is that if the report produced is longer than the OUTFIL source data, there's a run-time error. It's need depends on the length of the input records. If they end immediately after the data shown, a BUILD will be needed (doesn't need content, just length), because... That mistake comes out of my first, the thought that you couldn't SUBTOTAL a UFF (or CS/CSF). So no need to pre-format, which will mean the record is likely short, and the BUILD will likely be needed. The other difference is the length of the sequence number. In this case I can't see the need of a sequence number beyond one in length, to cause the break each time. dfsort "running total" ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN