Page 1 of 1

How to sum a decimal value using sort

PostPosted: Thu Aug 05, 2021 2:19 pm
by hkaur7087
the values in file are :-
11.29
0.95
1.40
11.64
3.37

Re: How to sum a decimal value using sort

PostPosted: Thu Aug 05, 2021 6:22 pm
by sergeyken
In order to summarize the five numeric values the best way would be - using a calculator.
No sort tool is required in this specific case.

Re: How to sum a decimal value using sort

PostPosted: Thu Aug 05, 2021 6:42 pm
by hkaur7087
this is just an example,I have millions of fields in file,which I want to sum up. Thanks

Re: How to sum a decimal value using sort

PostPosted: Thu Aug 05, 2021 7:36 pm
by sergeyken
If this was an example, then its specific numeric values are all irrelevant to your question.

What is relevant (but not mentioned in any manner):
- what are the field(s) format, and position(s)?
- what result format is expected?

Please, read ANY sort manual - especially SUM control statement, and OUTFIL TOTAL= parameter,
Then, try to run some tests ON YOUR OWN.
Then, apply your new knowledge to your original task.
Then, verify the results of your test(s).
If results are OK, then your issue is resolved.

If something goes wrong, then:
1) present to the forum ALL the code,
2) a critical portion of your input data,
3) the results produced by your test,
4) the expected results, what did you plan to get?
5) ALL and ANY error messages, produced either by JCL processing software (from SDSF), or by the SORT utility itself,
6) do not forget to use the forum’s code tags when presenting any code, or data

Good luck!

Re: How to sum a decimal value using sort

PostPosted: Thu Aug 05, 2021 7:48 pm
by sergeyken