View previous topic :: View next topic
|
Author |
Message |
Raghunadhareddy.J
New User
Joined: 26 Apr 2011 Posts: 6 Location: INDIA
|
|
|
|
My report file is as follows.
I need to compute the percentage by diving the second value by first value and percentage should be placed after the second value.
TOTAL 7,441 12
TOTAL 416,744 5,972
Thanks & regards
Raghu |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Please do the needful. |
ok,
what sort product are you using? |
|
Back to top |
|
|
Raghunadhareddy.J
New User
Joined: 26 Apr 2011 Posts: 6 Location: INDIA
|
|
|
|
we are using sync sort |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Does your input file have only TWO records always? And what is the expected output out of the sample input you have shown above? |
|
Back to top |
|
|
Raghunadhareddy.J
New User
Joined: 26 Apr 2011 Posts: 6 Location: INDIA
|
|
|
|
Hi Arun,
My input has many lines.not only two lines.
where ever we had a line having TOTAL in the report i need to compute the percentage and should be placed after the second value.
Thanks & regards
Raghu |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Why don't you show us a sample input and the expected output using "Code" tags. |
|
Back to top |
|
|
Raghunadhareddy.J
New User
Joined: 26 Apr 2011 Posts: 6 Location: INDIA
|
|
|
|
Hi Arun,
we can use SUM,MIN,MAX,AVG in TRAILER3 statement in sort.
As TRAILER3 statement does not allow arithmetic operations,created a module using the function NUMVAL-C that converts edited picture declaraions to normal declarations to compute percentage for the total lines on the report.
I am done with my requirement.
Thanks a lot for your time.
Thanks & Regards
Raghu |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
It's good to hear that you've found a way out yourself. But without having any clue on your requirement, I can't just agree to the point that it's not doable with your sort product. |
|
Back to top |
|
|
|