Dear All I could never thought that DFSORT should help to produce percentages of the records...
Thank you for your (more or less tricky) help Kind regards Kostas On 10 May 2013 20:10, Norbert Friemel <nf.ibmm...@web.de> wrote: > On Fri, 10 May 2013 08:53:40 -0500, K wrote: > > Two steps: > > //* > //S1 EXEC PGM=ICETOOL > //* > //TOOLMSG DD SYSOUT=* > //DFSMSG DD SYSOUT=* > //DATA DD DISP=(,PASS), > // DSN=&&DATA, > // SPACE=(80,(10,10)),AVGREC=U, > // LRECL=80,RECFM=FB > //TOTAL DD DISP=(,PASS), > // DSN=&&TOTAL, > // SPACE=(80,(1,1)),AVGREC=U, > // LRECL=80,RECFM=FB > //IN DD * > AAA > BBB > AAA > CCC > AAA > BBB > /* > //TOOLIN DD * > COPY FROM(IN) TO(DATA) > COUNT FROM(DATA) WRITE(TOTAL) TEXT('Total#,+') DIGITS(9) WIDTH(80) > /* > //* > //S2 EXEC PGM=SORT > //* > //SYSOUT DD SYSOUT=* > //SYMNOUT DD SYSOUT=* > //SORTIN DD DISP=(OLD,DELETE), > // DSN=&&DATA > //SORTOUT DD SYSOUT=* > //SYMNAMES DD DISP=(OLD,DELETE), > // DSN=&&TOTAL > //SYSIN DD * > SORT FIELDS=(1,3,CH,A) > INREC BUILD=(1,3,+10000,TO=PD,LENGTH=5,Total#,TO=PD,LENGTH=5) > SUM FIELDS=(4,5,PD) > OUTREC BUILD=(1,3,(((4,5,PD,DIV,9,5,PD),ADD,+5),DIV,+10), > EDIT=(IIIT,T%)) > /* > > > Norbert Friemel > > > >Hi dear all, > > > >I would like to produce a statistic report using ICETOOL. This report > should shown the percentage of records in the file according to their > values e.g. > > > >Input: > > > >AAA > >BBB > >AAA > >CCC > >AAA > >BBB > > > >Output Percentages: > > > >AAA 50,0 > >BBB 33,0 > >CCC 16,7 > > > >Is there any ICETOOL operator (like OCCUR) to find out the above > percentage? Do I have to use various INCLUDE COND and then read the DFSMSG > to extract percentages (from ICE054I 0 RECORDS - IN: xxx, OUT: yyy) ? > > > >Thanks in advance > > > >Kzafirop at gmail dot com > > > >---------------------------------------------------------------------- > >For IBM-MAIN subscribe / signoff / archive access instructions, > >send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN