Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
rmd3003,
The following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC 001 1
ABC 099 1
ABC 050 1
XYZ 010 5
XYZ 010 5
XYZ 010 5
XYZ 010 5
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
HEADER1=('NAME AMT CNT',/,
'-----------------'),
SECTIONS=(1,3,
TRAILER3=(1,3,2X,
TOT=(8,3,ZD,M10,LENGTH=5),2X,
TOT=(15,1,ZD,M10,LENGTH=5))),
TRAILER1=('-----------------',/,
'TOTAL',
TOT=(8,3,ZD,M10,LENGTH=5),2X,
TOT=(15,1,ZD,M10,LENGTH=5))
//* |
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:
Use [URL] BBCode for External Links |
|