Wow, I did not want this to be so difficult...but given a choice, I would like the second approach, as it is cleaner, but for the sake of learning (if you don't mind), I would welcome the first option, also, to make my training more complete!

Thank you and best regards,
Billy Ashton


------ Original Message ------
From "Sri h Kolusu" <skol...@us.ibm.com>
To IBM-MAIN@listserv.ua.edu
Date 3/28/2023 3:14:21 PM
Subject Re: DFSORT to count and sum subsets of data

 Kolusu, this works well when I have records to work with, but if I have no "D" 
records (sorry for the fat finger earlier...) to count or sum, I would still like to 
produce a summary. There will be no DEPARTMENT rows, but I would like to have the file 
name Header1, and a TOTAL line with the 0 Articles and 0 Items.

Billy,

There are different ways of getting results.  When the input does NOT have a 
"D" record, it will still generate the department row as you are using trailer3 
and it will have ZERO count and ZERO total.

Something like this

PROD.A31XAD.IDARTA00
 DEPARTMENT            0 ARTICLES, TOTAL ITEMS:            0
*** TOTAL *** :        0 ARTICLES, TOTAL ITEMS:            0


But if you insist on NOT having the Department record, then we need to do it 
slightly different.

PROD.A31XAD.IDARTA00
*** TOTAL *** :        0 ARTICLES, TOTAL ITEMS:            0


What is the preferred output ?  the First one or the second one?

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