IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SYNCSORT- Permuation and Combination


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Thu Oct 21, 2010 12:33 pm
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: 8797
Location: Welsh Wales

PostPosted: Thu Oct 21, 2010 12:43 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Oct 21, 2010 12:45 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Oct 21, 2010 4:16 pm
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

Moderator Emeritus


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

PostPosted: Thu Oct 21, 2010 9:34 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Oct 21, 2010 9:43 pm
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

Superior Member


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

PostPosted: Fri Oct 22, 2010 6:16 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Oct 24, 2010 2:12 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Sort counter to show records combination JCL & VSAM 2
No new posts Syncsort "Y2C" Function SYNCSORT 1
Search our Forums:

Back to Top