How to sum a decimal value using sort

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER
hkaur7087
Posts: 2
Joined: Thu Aug 05, 2021 2:11 pm
Skillset: Mainframe
Referer: Online

How to sum a decimal value using sort

Postby hkaur7087 » Thu Aug 05, 2021 2:19 pm

the values in file are :-
11.29
0.95
1.40
11.64
3.37

User avatar
sergeyken
Posts: 458
Joined: Wed Jul 24, 2019 10:12 pm
Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
Referer: Internet search

Re: How to sum a decimal value using sort

Postby sergeyken » Thu Aug 05, 2021 6:22 pm

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.
Javas and Pythons come and go, but JCL and SORT stay forever.

hkaur7087
Posts: 2
Joined: Thu Aug 05, 2021 2:11 pm
Skillset: Mainframe
Referer: Online

Re: How to sum a decimal value using sort

Postby hkaur7087 » Thu Aug 05, 2021 6:42 pm

this is just an example,I have millions of fields in file,which I want to sum up. Thanks

User avatar
sergeyken
Posts: 458
Joined: Wed Jul 24, 2019 10:12 pm
Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
Referer: Internet search

Re: How to sum a decimal value using sort

Postby sergeyken » Thu Aug 05, 2021 7:36 pm

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!
Javas and Pythons come and go, but JCL and SORT stay forever.

User avatar
sergeyken
Posts: 458
Joined: Wed Jul 24, 2019 10:12 pm
Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
Referer: Internet search

Re: How to sum a decimal value using sort

Postby sergeyken » Thu Aug 05, 2021 7:48 pm

Javas and Pythons come and go, but JCL and SORT stay forever.


  • Similar Topics
    Replies
    Views
    Last post