Joined: 03 May 2010 Posts: 13 Location: Malvern PA
My input dsn is a FBA report that contains data that I wish to summarize and produce just a total of the number of occurances and a SUM of the number of lines. My input records look like....
Code:
CICSRJE1 J026976 G5897 SMSSYHT 105 D R102
CICSRJE1 J713840 G7011 SMSSYHT 62125 D R102
ARMWP50 J756526 G1 SMSPROD 171 F R102
ARMWP50 J756550 G1 SMSPROD 164 F R102
PAMWF50 J828641 G1 SMSPROD 18 F R102
PAMWF50 J725056 G1 SMSPROD 20802 F R102
CICSRJE1 J617658 G3386 SMSSYHT 43 D R147
CICSRJE1 J184491 G1384 SMSSYHT 57 D R165
CICSRJE1 J323451 G703 SMSSYHT 57 D R165
CICSRJE1 J462147 G1095 SMSSYHT 57 D R165
CICSRJE1 J594882 G946 SMSSYHT 57 D R165
CICSRJE1 J594882 G6592 SMSSYHT 15 D R165
CICSRJE1 J594882 G10600 SMSSYHT 12 D R165
0CICSRJE1 J713840 G6987 SMSSYHT 71 D R165
CICSRJE1 J713840 G1698 SMSSYHT 6132 D R165
Each line displays a sysout and the number of lines and the destination.
Columns 51 for a length of 8 contain the JES2 destid and columns 39 for a length of 9 contain the number of lines of the report.
I would like to generate an output file that breaks by the data in column 51 (destination) and produces a line that summarizes by destination and totals the number of lines by destination.
For example I would like an output file like
Code:
DEST Tot LINES Num Rpts
R102 1232345 6
R147 43 1
R165 1234567 8
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Here's a DFSORT job that will do what you asked for. I assumed your input records were already sorted by the dest field as shown in your example. (The output totals you show don't correspond to the input amounts, but I ignored that.)
Joined: 03 May 2010 Posts: 13 Location: Malvern PA
Thank you so much for the accurate and quick response. The sample you supplied worked perfectly!
I really need to sit down and spend some time reading the Sort and tool documentation.
With that said, how can I (if it can be done) only print records that exceed a limiting value (for example if the count exceeds 200 or TOT exceeds 100K ) ?
Joined: 03 May 2010 Posts: 13 Location: Malvern PA
Thank You very much!!!
....This has saved me an enormous amount of time and effort, which I plan to use to educate myself on all the neat tricks that this product can perform.