If you want to write a grand total for the input amounts, you can use DFSORT's OUTFIL with TRAILER1 and TOTAL.
If you want to do something with an existing report as input, you'll need to do something fancier. What you'd do depends on exactly what your input looks like, the RECFM and LRECL, etc, which is not clear.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:http://www.ibm.com/support/docview.wss? ... g3T7000080