Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use the OCCUR operator of DFSORT's ICETOOL to do that. For example:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//RPT DD DSN=... output file
//TOOLIN DD *
OCCUR FROM(IN) LIST(RPT) NOHEADER ON(10,3,CH) ON(VALCNT,E'99')
/*
|
For complete information on the OCCUR operator, see:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.9?DT=20060615185603 |
|
Rajen
New User
Joined: 05 May 2005 Posts: 61
|
|
|
|
Hi
Below is SYNCSORT Solution.
Code: |
//SYSIN DD *
INREC FIELDS=(1,21,C'000001')
SORT FIELDS=(1,21,CH,A)
SUM FIELDS=(22,6,ZD)
OUTFIL REMOVECC,
HEADER1=('COUNTS OF RECORDS'),
OUTREC=(1:11,3,1X,22,6,ZD,EDIT=(III,IIT),80X)
/* |
Let me know if it is not clear.
Thanks,
Rajen Patel. |
|