Oh very nice.
I like the report!! Just never thought about it.

Amazing.

Thank you!

On Thu, Aug 1, 2019 at 11:26 AM Sri h Kolusu <skol...@us.ibm.com> wrote:

> > I would want to extract and summarize FRED and if I have
> >        DATACLAS=POTATO I would want to extract and summarize POTATO
>
>
> Cameron Conacher,
>
> Use the following DFSORT JCL which will give you the desired results. I
> coded the JCL to handle if your input is VB or FB based on the INCLUDE cond
> you showed.
>
> //STEP0100 EXEC PGM=SORT
> //SYSOUT   DD SYSOUT=*
> //SORTIN   DD *
>     SOME HEADER - NOT INCLUDED
>             DATACLAS=POTATO  - NEEDED
>     DATACLAS=FRED
>                       DATACLAS=POTATO  - NEEDED
>                    DATACLAS=POTATO  - NEEDED
>     SOME OTHER RECORD - NOT INCLUDED
>       DATACLAS=CONACHER
>         DATACLAS=CONACHER
>            DATACLAS=CONACHER
> //SORTOUT  DD SYSOUT=*
> //SYSIN    DD *
>   INCLUDE COND=(5,70,SS,EQ,C'DATACLAS=')
>
>   INREC PARSE=(%01=(STARTAFT=C'DATACLAS=',
>                     ENDBEFR=C' ',FIXLEN=8)),
>   BUILD=(1,4,%01)
>
>   SORT FIELDS=(5,8,CH,A)
>
>   OUTFIL REMOVECC,NODETAIL,VTOF,BUILD=(80X),
>   HEADER2=('DATACLASS      COUNT',/,
>            '---------   --------'),
>   SECTIONS=(5,8,
>   TRAILER3=(5,8,4X,
>             COUNT=(M10,LENGTH=8)))
> /*
>
> The output from this job is
>
> DATACLASS      COUNT
> ---------   --------
> CONACHER           3
> FRED               1
> POTATO             3
>
>
> Further if you have any questions please let me know
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
> ----------------------------------------------------------------------
> 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

Reply via email to