Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT- Permuation and Combination

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Thu Oct 21, 2010 12:33 pm    Post subject: SYNCSORT- Permuation and Combination
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 21, 2010 12:43 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Oct 21, 2010 12:45 pm    Post subject: Reply to: SYNCSORT- Permuation and Combination
Reply with quote

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
View user's profile Send private message
subramanyam.g

New User


Joined: 15 Sep 2005
Posts: 1
Location: Hyderabad

PostPosted: Thu Oct 21, 2010 4:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 21, 2010 4:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Oct 21, 2010 9:34 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Oct 21, 2010 9:43 pm    Post subject: Reply to: SYNCSORT- Permuation and Combination
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Oct 22, 2010 6:16 pm    Post subject: Re: Reply to: SYNCSORT- Permuation and Combination
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sun Oct 24, 2010 2:12 pm    Post subject: Reply to: SYNCSORT- Permuation and Combination
Reply with quote

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 icon_evil.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us