Page 1 of 1

print stat for the fields using ICEMAN

PostPosted: Wed Oct 21, 2009 8:55 am
by Danielle
Hi all
Please help,
I would like to print a statistic for the fields using ICEMAN
say prefer astatistic of 2 fields A and B
A start at pos 83,10,ch
B start at pos 1,9,ch

so for each type in field A, count number of rows in filed B for each type in field A
for ex:

input file :
A B
aaaa 123458798
aaaa 125623469
aaaa 368859008
abcd 769843578
abcd 688767897
...

output file the statistic like:

aaaa 3
abcd 2
...

Thanks a lot
Danielle

Re: print stat for the fields using ICEMAN

PostPosted: Wed Oct 21, 2009 9:38 pm
by Frank Yaeger
Here's a DFSORT/ICETOOL job that will do what you asked for:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=... input file
//OUT DD SYSOUT=*
//TOOLIN DD *
OCCUR FROM(IN) LIST(OUT) ON(83,10,CH) ON(VALCNT,U05) BLANK -
  NOHEADER NOCC
/*


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