ICETOLL Report : SUM of Amounts in OCCUR

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER
golemis
Posts: 34
Joined: Wed Apr 04, 2018 8:13 pm
Skillset: z/OS, REXX, DB2, CICS, MQ, ISPF, DFSMS
Referer: google
Location: London, UK

ICETOLL Report : SUM of Amounts in OCCUR

Postby golemis » Wed Jan 30, 2019 7:52 pm

Hi,
I have a Dataset which have two distinct values on pos 221-225. They also have Amounts in pos 205-215. I need to build a summary report for count and sum of the two occurrences. I try:

Code: Select all

OCCUR  FROM(SORTIN) LIST(PRT) BLANK -
DATE TITLE('XXXX Failures Report') PAGE -
    HEADER('Fail/Success') HEADER('Count') -
    ON(221,5,CH) ON(VALCNT)


Which gives me :

    01/30/19 XXXX Failures Report - 1 -

    Fail/Success Count
    ------------ ---------------
    FALSE 114
    TRUE 3708

but I cannot find a way to include the total amount of the two above cases next to the count.

If I add:

Code: Select all

DISPLAY FROM(SORTIN) LIST(PRT) BLANK -
  HEADER('Amount') ON(205,11,SFF) -
  BTITLE('F/S') BREAK(221,5,CH) -
    BTOTAL('Total')


I get almost all records listed and I am getting into a mess

Any hints ?

Thanks in advance, George

golemis
Posts: 34
Joined: Wed Apr 04, 2018 8:13 pm
Skillset: z/OS, REXX, DB2, CICS, MQ, ISPF, DFSMS
Referer: google
Location: London, UK

Re: ICETOLL Report : SUM of Amounts in OCCUR

Postby golemis » Thu Jan 31, 2019 2:40 pm

Solved using:

Code: Select all

 SORT FIELDS=(221,5,CH,A)
    OUTFIL REMOVECC,NODETAIL,
    SECTIONS=(221,5,
    TRAILER3=(221,5,10:COUNT,
    20:TOT=(205,11,UFF,EDIT=(IIIIIIIT.TT))))

vikbali
Posts: 1
Joined: Mon Oct 05, 2020 11:45 pm
Skillset: Cobol ,jcl
Referer: Google

Re: ICETOLL Report : SUM of Amounts in OCCUR

Postby vikbali » Tue Oct 06, 2020 7:34 am

Is it still possible to get COUNT and SUM together using ICETOOL?

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

Re: ICETOLL Report : SUM of Amounts in OCCUR

Postby NicC » Tue Oct 06, 2020 3:03 pm

Why do you not read the manual for your sort version and run some experiments instead of tagging on to the end of someone elses old topic?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic


  • Similar Topics
    Replies
    Views
    Last post