View previous topic :: View next topic
|
Author |
Message |
shrivatsa Warnings : 1 Active User
Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
Hi All,
Input File:- FB, LRECL=80
Code: |
1001 33.23
1001 24.65
1001 89.00
1001 23.23
1001 20.00
1002 10.01
1002 10.02
1002 10.70 |
I want all the combination Sum which is 56.46 and 20.72
Ouptut File:-
Code: |
1001 33.23
1001 23.23
Sum 56.46
1002 10.01
1002 10.70
Sum 20.72 |
Please let me know if this can be done in Syncsort? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You may know what you mean, but I certainly do not.
Please explain in great detail the rules for getting from input to output.
Which program / utility are you going to use.
If sort, which product and release level is installed at your site. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if You want help it would be wiser to describe better Your requirement
combination sum might be clear inside Your organization, for outsiders is just nonsense
from the data posted there is no criteria for a deterministic choice |
|
Back to top |
|
|
subramanyam.g
New User
Joined: 15 Sep 2005 Posts: 1 Location: Hyderabad
|
|
|
|
i think he needs the sum of all the occurrences of 56.46 and 20.72.
you can say include cond= (ss,ll,fmt, eq, values)
where
ss starting position of the field
ll length
fmt type of data
sum fields=(ss,ll,fmt)
Hope this helps. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
subramanyam.g
Did you test this before posting
Which sort product and release level are you using
Is it the same as that of the OP |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
This looks like the basic "cash application" requirement. . . which would not be a "sort" opportunity.
A check comes into accouts receivable from some customer and the system must determine which "invoices" to pay using the check.
The way this typically works is that there are many unpredictable input amounts (not 2 literals as shown here). There is also much more to applying cash than simply finding some invoices that "add up" to the amount of the check. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if the ts instead of
Quote: |
I want all the combination Sum which is 56.46 and 20.72 |
had said
I want for <key> 1001 all the combinations for which the sum of the amounts is 56.46
and
I want for <key> 1002 all the combinations for which the sum of the amounts is 20.72
maybe all the world would have understood better
ok for the language barrier, but a minimum effort is still required from/for a E2L |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
enrico-sorichetti wrote: |
ok for the language barrier, but a minimum effort is still required from/for a E2L |
I Agree. Also, most of his earlier sort-related post are in DFSORT part of the Forum. So I really look forward to see the SYSOUT mesages from the run of following Job:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/* |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
do not expect too reply from the TS !
I just lurked thru the topics he started and most of the times he just disappears after the initial post
just wasting time trying to help him |
|
Back to top |
|
|
|